1

I need to get the C node that has the field (name = p and value = 4)

How to get this without using index?

<A>
    <B>
        <C>
            <field name="p" value="1"/>
            <field name="q" value="2"/>
        </C>
        <C>
            <field name="p" value="3"/>
            <field name="q" value="4"/>
        </C>
    </B>
</A>

1 Answers1

0

Try the following Xpath.

//field[@name="q"][@value="4"]/..
KunduK
  • 32,888
  • 5
  • 17
  • 41