This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XPath Doubt." Watch "XPath Doubt." New topic
Author

XPath Doubt.

Jose Mon
Ranch Hand

Joined: Feb 13, 2007
Posts: 30
Hi,
I had many tags like

<ingredient name="vanilla extract" amount="1" unit="teaspoon"/>

Also I had Xpath expression like

//ingredient[@name="flour"]/@amount

to show the amount of ingredient name="flour".

But I need to get 2 attributes.
ie I need to get amount and unit too. What is the solution for this?


Thanks in Advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Two XPath expressions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XPath Doubt.
 
Similar Threads
Understanding the DAO Pattern
A little help with my first program
JSTL and xml
Liking Spam
JavaFx XML file read