tags:

views:

125

answers:

2

How can I get the values of all nodes called "title" from the XML below ?

<bookstore>
<bookA>
 <title> Title Book A</title>
 <desc> Book A </desc>
<bookA>

<bookB>
 <title> Title Book B</title>
 <desc> Book B </desc>
<bookB>
</bookstore>

Thanks

+1  A: 

try: bookstore//title

// means any child (including grandchildren) named title

By the way, you didn't close off the book elements.

Sarah
A: 

Another option would be: bookstore/*/title

Guster_Q