XSLT: for-each in for-each not working


  • My xml is as below

        <Code>8980000473  </Code>
          <AreaCode>840602      </AreaCode>
          <AreaCode>440301      </AreaCode>

    Xsl is as below

    <Territories m:null="true">
                <xsl:for-each select="Address" />
                <xsl:value-of select="Address/AreaCode" />

    It allways pick up only one area code, how can I incluede all area in Territories

    Wednesday, September 25, 2013 9:32 AM

All replies

  • The value selection of AreaCode is not inside the for-each.

    <xsl:for-each select="Address">
      <xsl:value-of select="AreaCode"/>

    • Edited by MasaSam Wednesday, October 02, 2013 5:17 AM typo
    • Proposed as answer by ranta Tuesday, November 19, 2013 5:51 PM
    Monday, September 30, 2013 5:26 AM