I have a xml and xsl as shown below I want to display all the values in the xml
Input XML
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<test>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
</test>
<test1>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</test1>
</cd>
<cd>
<test>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
</test>
<test1>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</test1>
</cd>
</catalog>
XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th style="text-align:left">Title</th>
<th style="text-align:left">Artist</th>
<!--<th style="text-align:left">country</th>
<th style="text-align:left">company</th>-->
</tr>
<xsl:for-each select="catalog/cd/test">
<tr>
<td><xsl:value-of select="//title"/></td>
<td><xsl:value-of select="//artist"/></td>
<!--<td><xsl:value-of select="//country"/></td>
<td><xsl:value-of select="//company"/></td>-->
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I want to display the title, artist, country and company values of all the cd loop. By the above code I can only display the first value. Can any help me how to loop through the xml and display all the values.