My attempt didn't include /response, but I'd hoped it would work. That
pretty much exhausts my knowledge of XPath, so I'll have to bow out now.
Good luck.

Blair


On Mon, Nov 25, 2013 at 3:25 PM, Dale Fraser <[email protected]> wrote:

> 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:* [email protected] [mailto:[email protected]] *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/WSc3ff6d0ea77859461172e0811cbec22c24-78cc.html
> http://www.w3schools.com/xpath/xpath_syntax.asp
>
> Blair
>
>
>
> On Mon, Nov 25, 2013 at 1:36 PM, Dale Fraser <[email protected]> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/groups/opt_out.

<<image001.png>>

Reply via email to