I have the following xml and want to get the attribute (identifier='content')(identifier='content') value for the attribute (identifier='id')(identifier='id') with idid 510 with the help of xpath.
<product id='1'> <row='1'> <attribute identifier='id'>510</attribute> <attribute identifier='content'>Test 1</attribute> </row> <row='2'> <attribute identifier='id'>100</attribute> <attribute identifier='content'>Test 2</attribute> </row> ... </product> I tried it with:
//product[@id='1']/row/attribute[@identifier='id' and text()='510'] But as I already know this returns me only the content of the attribute with identifier='id'identifier='id'. How to gehtget the value of identifier='content'identifier='content' where identifier 'id'= 510'id'= 510?
Thanks for any help.