How to get attribute value from node using xpath?
return-value, string, xml, xpath
Solution
this should do the trick:
string(//Value[@Value='b']/@CustomAttr)
Problem
Totally new to xpath. I have xml: ``` <Values> <Value Value="a" CustomAtr="1" /> <Value Value="b" CustomAtr="2" /> <Value Value="c" CustomAtr="3" /> </Values> ``` To get value by index, i can use: `string(/*/Value[1]/@CustomAtr)` Is it possible to get value by key? Hot to get `CustomAtr` value where `Value="b"` ? Thank you