Mega Code Archive

 
Categories / C# Tutorial / XML
 

Transform XML document to a html document

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Xml.Xsl; using System.Xml; public class MainClass {     public static void Main(){         XslCompiledTransform transform = new XslCompiledTransform();         // Load the XSL stylesheet.         transform.Load("orders.xslt");         // Transform orders.xml into orders.html using orders.xslt.         transform.Transform("orders.xml", "orders.html");     } }