// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Xml; using System.Xml.Xsl; namespace E { public class Program { public static void Main(string[] args) { XmlDocument doc = new XmlDocument(); doc.Load("tony.xml"); XslCompiledTransform xslt = new XslCompiledTransform(); xslt.Load("tony.xsd"); XmlTextWriter wrt = new XmlTextWriter(Console.Out); // should probably be a StreamWriter in real code wrt.Formatting = Formatting.Indented; xslt.Transform(doc, wrt); } } }