how do you loop through child nodes to display the values?
For Examle:
XML
<Store>
<Customer>
<Name>a</Name>
<Age>1</Age>
<Address>high street</Address>
</Customer>
<Customer>
<Name>b</Name>
<Age>2</Age>
<Address>low street</Address>
</Customer>
</Store>
XSL
<xsl:template match="Store">
<xsl:for-each select="Customer">
<tr>
<xsl:for-each select="????child::Customer?????">
<td>
<xsl:value-of select="???child::Customer?????" />
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:template>
So instead of listing each attribute, such as Name, Age, Address for each customer, is there a way to loop through the children of Customer to display their values in a table?
Please help.
Ask if you need me to explain more.
regards.
For Examle:
XML
<Store>
<Customer>
<Name>a</Name>
<Age>1</Age>
<Address>high street</Address>
</Customer>
<Customer>
<Name>b</Name>
<Age>2</Age>
<Address>low street</Address>
</Customer>
</Store>
XSL
<xsl:template match="Store">
<xsl:for-each select="Customer">
<tr>
<xsl:for-each select="????child::Customer?????">
<td>
<xsl:value-of select="???child::Customer?????" />
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:template>
So instead of listing each attribute, such as Name, Age, Address for each customer, is there a way to loop through the children of Customer to display their values in a table?
Please help.
Ask if you need me to explain more.
regards.