Link to home
Start Free TrialLog in
Avatar of tesmc
tesmcFlag for United States of America

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.
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tesmc

ASKER

thanks is worked.