I have the following xml and want to get the attribute (identifier='content') value for the attribute (identifier='id') with id 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 only the content of the attribute with identifier='id'. How to get the value of identifier='content' where identifier 'id'= 510?
Thanks for any help.
<row/>elements.