PDA

View Full Version : Help with XPATH


Too_Tall_Crown_Victoria
06-18-2012, 01:07 PM
Once again I am struggling with XPATH so I apologize ahead of time for asking for help.

I have the following xml:

<foo>
<bar>
<name>John</name>
</bar>
<baz>
<name>Bob</name>
</baz>
<bang>
<name>Pete</name>
</bang>
</foo>

I need to read the xml and read the node names under "foo" and then loop on each node to read the name. So what I am looking for is a loop that returns me "bar" and "John", second iteration "baz" and "Bob" and third iteration "bang" and "Pete". I also need to do some processing on these values.

Any help would be greatly appreciated.

kinook
06-18-2012, 01:52 PM
See the attached sample.