Hello.. I have been trying to figure this out for the last hour, but I am
baffled... I'm hoping someone can help!
I'm trying to write an xpath expression to find the position of the node
with value "c" in the following xml. The result I'm looking for in this case
should be 3. Does anyone have any ideas?
<?xml version="1.0" encoding="UTF-8"?>
<TopNode>
<FieldDefinition>a</FieldDefinition>
<FieldDefinition>b</FieldDefinition>
<FieldDefinition>c</FieldDefinition>
<FieldDefinition>d</FieldDefinition>
<FieldDefinition>e</FieldDefinition>
</TopNode>
My idea was something like:
/*/position(". = 'c'")
But that doesn't work.
Could anyone please help! Thank you very much in advance.
--
Steve