This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman 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 Building Microservices this week in the Design 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
Sheriff

Joined: Oct 14, 2005
Posts: 19728
    
  10

Two XPath expressions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XPath Doubt.
 
It's not a secret anymore!