.

XSL Transformations

 

XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load("a.xml");

XslTransform xslTransform = new XslTransform();
xslTransform.Load("b.xsl");


StringWriter stringWriter = new StringWriter();
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter);
xmlTextWriter.Formatting = Formatting.Indented;
xslTransform.Transform(xmlDocument, null, xmlTextWriter);

xmlTextWriter.Flush();
Console.Write(stringWriter.ToString());

 

What's your thoughts on this?

*

Protected by WP Anti Spam