none
XSLT: for-each in for-each not working

    Question

  • My xml is as below

    <Customers>
      <Customer>
        <Code>8980000473  </Code>
          <Address>
          <AreaCode>840602      </AreaCode>
          </Address>
          <Address>
          <AreaCode>440301      </AreaCode>
          </Address>
          </Customer>
       </Customers>

    Xsl is as below

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

    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"/>
    </xsl:for-each>



    • 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