I'm having trouble figuring out how to select data using a compound XPath query so that I can essentially find the 5th column of row in my data. Here is my example XML:
<sample>
<OBX>
<field position="1">1</field>
<field position="2">My Value</field>
</OBX>
<OBX>
<field position="1">2</field>
<field position="2">My other (and more important) value</field>
</OBX>
</sample>
Basically all I need to do is find the value of [field @position='2'] when [field @position='1'] is equal to 2. I am trying:
OBX[./field[@position='1']='2']/field[@position='2']
but this doesn't come up with any value. What would be the proper way to get this accomplished?
Thanks,
Mike