Browse an xml tree and get a specific value

Ucgvneneeghxo

New Member
Having this xml document\[code\]<root><bookstore> <presc:book> <presc:id>1</presc:id> <presc:title>Harry Potter</presc:title> <presc:price>29.99</presc:price> </presc:book> <presc:book> <presc:id>2</presc:id> <presc:title>Learning XML</presc:title> <presc:price>39.95</presc:price> </presc:book> <presc:book> <presc:id>3</presc:id> <presc:title>Java for Life</presc:title> <presc:price>54.49</presc:price> </presc:book></bookstore>\[/code\] I'd like the get the value of 'presc:price' only where 'pres:id'=2.Thanks for any help.
 
Back
Top