tesmc
asked on
XSL : Retrieve value of attribute higher in xml path
I have the following input XML.
<root>
<Envelope>
<Body>
<Response>
<Itin>
<Services Item="005"">
<Service Code="SOS">
<Extensions>
<Type>PAYMENT</Type>
</Extensions>
</Service>
</Services>
<Itin>
</Response>
</Body>
</Envelope>
</root>
I want to get the @Item value (removing leading zeros) when the Type="PAYMENT" and @Code="SOS" and store it into a variable.
So the variable should = 5.
<root>
<Envelope>
<Body>
<Response>
<Itin>
<Services Item="005"">
<Service Code="SOS">
<Extensions>
<Type>PAYMENT</Type>
</Extensions>
</Service>
</Services>
<Itin>
</Response>
</Body>
</Envelope>
</root>
I want to get the @Item value (removing leading zeros) when the Type="PAYMENT" and @Code="SOS" and store it into a variable.
So the variable should = 5.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
welcome
ASKER