Reputation: 1341
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
Upvotes: 1
Views: 4493
Reputation:
Try: bookstore//title
//
means any child (including grandchildren) named title
By the way, you didn't close off the book elements.
Upvotes: 4