Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XPath Doubt.

 
Jose Mon
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20958
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two XPath expressions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic