Hi megala, Try this example /*** samp2.xml **/ <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="samp2.xsl"?> <CATALOG> <CD> <TITLE>Empire Burlesque</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> <CD> <TITLE>Return of the Judai</TITLE> <ARTIST>Judas Priest</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>20.90</PRICE> <YEAR>1995</YEAR> </CD> <CD> <TITLE>Dangerous</TITLE> <ARTIST>Michael Jackson</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Sony</COMPANY> <PRICE>30.00</PRICE> <YEAR>1992</YEAR> </CD> </CATALOG> /****samp2.xsl ****/ <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <table border="2" bgcolor="cyan"> <tr> <th>Title</th> <th>Artist</th> <th>Price</th> <th>Company</th> </tr> <xsl:for-each select="CATALOG/CD"> <tr> <td><xsl:value-of select="TITLE"/></td> <td><xsl:value-of select="ARTIST"/></td> <td><xsl:value-of select="PRICE"/></td> <td><xsl:value-of select="COMPANY"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet><?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <table border="2" bgcolor="cyan"> <tr> <th>Title</th> <th>Artist</th> <th>Price</th> <th>Company</th> </tr> <xsl:for-each select="CATALOG/CD"> <tr> <td><xsl:value-of select="TITLE"/></td> <td><xsl:value-of select="ARTIST"/></td> <td><xsl:value-of select="PRICE"/></td> <td><xsl:value-of select="COMPANY"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> copy these 2 files in a directory..And call samp2.xml file in a browser..u will get the following in a table format.. Title Artist Price Company Empire Burlesque Bob Dylan 10.90 Columbia Return of the Judai Judas Priest 20.90 Columbia Dangerous Michael Jackson 30.00 Sony welcome to xml and All the best in learning...
XML is a technology to specify and render data. Its NOT a traditional computer language like C/C++/Java/... that you write programs and compile to see results (atleast not in that sense). Its more of a "how to represent this data?" and a lot more... regds. - satya
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Whip out those weird instruments of science and probe away! I think it's a tiny ad: