Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void Transform(Stream xmlDoc, string sXslPath, Stream outStream)
- {
- //load the Xml doc
- XPathDocument myXPathDoc = new XPathDocument(xmlDoc);
- XslTransform myXslTrans = new XslTransform();
- //load the Xsl
- myXslTrans.Load(sXslPath) ;
- //create the output stream
- using (XmlTextWriter myWriter = new XmlTextWriter(outStream, null))
- {
- //do the actual transform of Xml
- myXslTrans.Transform(myXPathDoc,null, myWriter);
- }
- }
Add Comment
Please, Sign In to add comment