>- see footer for list info -< Can't you just do aResults = XMLSearch(myXML,'myroot/myelement'); aResults.xmltext;
This isn't a soap response by any chance is it ? Russ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Watson Sent: 03 July 2007 19:35 To: Coldfusion Development Subject: [CF-Dev] XMLSearch >- see footer for list info -< I'm reading up on XML and playing around with some XPath stuff in CF. I am trying to use the text() location step to get at just the xmlText of the element I am searching for, e.g. aResults = XMLSearch(myXML,'myroot/myelement/text()'); This produces an array of objects of 'unknown type'. I do like this... <cfdump var="#aResults[1].GetClass().GetName()#"> ...and see that the object's class is "*org.apache.crimson.tree.TextNode*". I then look this up on t'internet and eventually find an inherited method called GetData() which returns the string. So: aResults = XMLSearch(myXML,'myroot/myelement/text()'); for(i=1; i LTE aResults.size(); i=i+1) WriteOutput(aResults[i].GetData()); Surely this is lunacy?! Is there another way to get at the XMLText with XPath without having to loop? Thanks in advance, Dom _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >-< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
