Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

xpath question  RSS feed

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I retrive a value in an xml document.
My XML document is
<product>
<id>p1</id>
<name>book</name>
</product>

How can I retrive the id value p1 using xpath?
Thanks in Advance
Sudhakar
 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My XML document is
<product>
<id>p1</id>
<name>book</name>
</product>

How can I retrive the id value p1 using xpath?



"/product/id/text()"

-Raj
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!