I have a payload like mentioned below.
<A xmlns:com="http://www.example.com/xml/xmlns/example">
<B>
<X appCode="001">xxx</X>
<Y appId="0002">yyy</Y>
</B>
<C>
<D>
<E>
<F id="1" code="001">test-1</F>
<F id="3" code="002">test-2</F>
<F id="4" code="003">test-3</F>
<F id="5" code="004">test-4</F>
</E>
</D>
</C>
</A>
I need to get the id value for A/C/D/E/F['test-2']. Also, I have to use local-name() to avoid namespaces. Tried the following and get the below result.
//* [local-name() = 'C']/* [local-name() = 'D']/* [local-name() = 'E']/* [local-name() = 'F']
<F id="1" code="001">test-1</F>
<F id="3" code="002">test-2</F>
<F id="4" code="003">test-3</F>
<F id="5" code="004">test-4</F>
How to find the id value of 'test-2' which is 3? (NOTE: I'm using this in wso2 EI property mediator)
Thank You in Advance!