Reputation: 379
I have an XML file:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<nodeA>
</nodeA>
<nodeB>
<nodeB></nodeB>
<nodeB></nodeB>
<nodeB></nodeB>
<nodeB></nodeB>
</nodeB>
<nodeC>
</nodeC>
</root>
I want to write an XPATH expression which will select the <nodeB>
which is the parent of the other <nodeB>
nodes. I tried something like
"//nodeB/nodeB/parent::nodeB"
but it also choses <nodeC>
besides the one I want.
Can you please help?
thanks mc
Upvotes: 0
Views: 61