Using XPath to get XML chunk

xpath , java , xml Sunnyvale, United States
  • 11 years ago
    Hi I'm new to XPath and would like to know using XPath and Java if can we get the XML chunks (ie along with markups/tags) instead of just values enclosed by tags? Consider the sample XML: Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 From the sample XML above , using XPath, how can I get the second book element as shown below. Harry Potter J K. Rowling 2005 29.99
  • 11 years ago
    Couldnt post the XML as is. Ignore the XML example.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...'” - Isaac Asimov