Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XPath doubt.

 
Jose Mon
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider the following XML

<CarInfo>
<Type>W</Type>
<CarVnd>ZE</CarVnd>
</CarInfo>


I want to Query the <CarInfo> tags which contains <CarVnd>ZE</CarVnd>

<CarInfo> is repeated so many times with different <carVnd> tags.

Can anyone give me the XPath query.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say "where" in your informal description, that corresponds to using a predicate in XPath. Like this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic