It's not a secret anymore!
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 Java Interview Guide this week in the Jobs Discussion 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
I had many tags like

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

Also I had Xpath expression like


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

Joined: Oct 14, 2005
Posts: 19973

Two XPath expressions.
I agree. Here's the link:
subject: XPath Doubt.
It's not a secret anymore!