File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XPath doubt. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XPath doubt." Watch "XPath doubt." New topic

XPath doubt.

Jose Mon
Ranch Hand

Joined: Feb 13, 2007
Posts: 30
Consider the following XML


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

Joined: Oct 14, 2005
Posts: 19858

When you say "where" in your informal description, that corresponds to using a predicate in XPath. Like this:
Don't get me started about those stupid light bulbs.
subject: XPath doubt.
jQuery in Action, 3rd edition