That's what I figured but couldn't get it to work.
That example doesn't work either xmlSearch(xml, "/response/result/recorddetail/FL[@val='id']"); Returns nothing. xml.response.result.recorddetail.FL[1].xmltext; This works, but assumes that row 1 is the id which is dangerous. Regards Dale Fraser From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Blair McKenzie Sent: Monday, 25 November 2013 2:17 PM To: Unname Subject: Re: [cfaussie] Access XML Element You need XPath. Something like this should return the node you want, then you can access the text as you normally would: XmlSearch(myxmldoc, "/result/recorddetail/FL[@val='id']") http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172 e0811cbec22c24-78cc.html http://www.w3schools.com/xpath/xpath_syntax.asp Blair On Mon, Nov 25, 2013 at 1:36 PM, Dale Fraser <d...@fraser.id.au <mailto:d...@fraser.id.au> > wrote: I have XML that looks like below I'd like to know the best way of retrieving the XmlText for the FL element where the XmlAttributes/val is Id Thus returing the 102539900000000066081 number. I can do this by looping over the record detail, but figured there was a better way. Regards Dale Fraser -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie%2bunsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com. To post to this group, send email to cfaussie@googlegroups.com. Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/groups/opt_out.
<<image001.png>>