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

asked on

XSL: retrieve value of attribute

<root>
      <Envelope>
            <Body>
                  <ReadRS>
                        <Itin>
                              <Info>
                                    <Items>
                                          <Item RSS="1">
                                                <Flight ... />
                                          </Item>
                                    </Items>
                              </Info>
                        </Itin>
                  </ReadRS>
            </Body>
      </Envelope>
</root>


i'm trying to grab the attribute @RSS by doing the following

<xsl:for-each select="/root/Envelope/Body/ReadRS/Itin/Info/Items/Item/Flight">
  <xsl:value-of select="number(./@RSS)"/>
</xsl:for-each>
     
but this keeps returning NaN.
What am i doing wrong?
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

ay!
thank you so much. works now.