ASP.Net/XML/XML control
Use asp:XML to transform XML document
<source lang="csharp">
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<title>Untitled Page</title>
</head> <body>
<form id="form1" runat="server">
<asp:Xml id="Xml1" runat="server" DocumentSource="Data.xml" TransformSource="Data.xslt"></asp:Xml>
</form>
</body> </html> File: Data.xslt <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/Data">
<xsl:for-each select="Category"> <xsl:value-of select="@title"/>
<xsl:for-each select="Product"> -<xsl:value-of select="@title"/>
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:stylesheet>
File: Data.xml <?xml version="1.0"?>
<Category title="DVD"> <Product title="A" /> <Product title="B" /> </Category> <Category title="Books"> <Product title="C" /> <Product title="D" /> <Product title="E" /> </Category>
</source>