aspose file tools*
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
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: 18674
    
    8

Two XPath expressions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XPath Doubt.