using System;
using System.IO;
using System.Xml;
using System.Xml.Xsl;
class WriteXMLViaXSL
{
public static void Main(string[] args)
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(args[0]);
XslTransform xslTransform = new XslTransform();
xslTransform.Load(args[1]);
StringWriter stringWriter = new StringWriter();
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter);
xmlTextWriter.Formatting = Formatting.Indented;
xslTransform.Transform(xmlDocument, null, xmlTextWriter);
xmlTextWriter.Flush();
Console.Write(stringWriter.ToString());
}
}
Subscribe to:
Post Comments (Atom)
The XslTransform class is obsolete now.. instead you can use enhanced class XslCompiledTransform
ReplyDeleteThanks for Comment It May Helpm Others
ReplyDelete