Jump to content

XPath for non-root xml


vishwa.m
 Share

Recommended Posts

Hi,I am very new to this forum. I started learning XPath queries.Can anyone please assist me on how to get elements from an xml which doesn't have a root element. For example:

The xml:

<book id="bk101">
<author>Gambardella, Matthew</author>
<description>with XML.</description>
</book>
<book id="bk201">
<author>Gambardella, Matthew</author>
<description>with XML.</description>
</book>
<book id="bk301">
<author>Gambardella, Matthew</author>
<description>with XML.</description>
</book>
Now I want to get a book element where the book id is bk101.
Thanks in advance,
Vishwanath

Thanks,Vishwanath

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...