This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XPath query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XPath query" Watch "XPath query" New topic
Author

XPath query

Pradeep Katipamula
Ranch Hand

Joined: May 11, 2010
Posts: 37
Hi,

I am new to XPath and am finding it difficult to get an expression to get the below result.

sample data


Now I want an expression which will omit the activity tags which don't have 'dance' and 'sing' in the 'what' tag and other tags like name and age should be retianed.

RESULT:



Can you please help.

Thanks a lot for your time.

Regards,
Pradeep
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: XPath query
 
Similar Threads
have node object, need to view it's xml?
problem in getting xpath of each node.
XPath Query
SAXPARSER - Problem while parsing HTTPS Response XML
How to pass multiple params