Skip to main content

Posts

Showing posts with the label code

XML to HTML

To convert XML to HTML you need an XSL (XSLT) file and some application to transform the XML to HTML using this XSL file. Usually this work is done by the browser, by including a link to the XSL file in the XML file, when you open the file in a browser it runs the transform on the XML using the XSL file you've pointed to. But I wanted to run this as a seperate step from a batch file so that I can create my .html files on disk but maintain their content using XML. Here's how I've done it: using   System ; using   System . Collections . Generic ; using   System . Linq ; using   System . Text ; using   System . Xml . Xsl ; using   System . IO ; namespace   Tool . XMLToHTML {      class   Program     {          ///   <summary>          ///  "Help\Help3\_HelpSource\gravity.xslt" "Help\Help3\_HelpSource"...