Guest User

Untitled

a guest
Jun 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1.  
  2. public static void Transform(Stream xmlDoc, string sXslPath, Stream outStream)
  3. {
  4. //load the Xml doc
  5. XPathDocument myXPathDoc = new XPathDocument(xmlDoc);
  6.  
  7. XslTransform myXslTrans = new XslTransform();
  8.  
  9. //load the Xsl
  10. myXslTrans.Load(sXslPath) ;
  11.  
  12. //create the output stream
  13. using (XmlTextWriter myWriter = new XmlTextWriter(outStream, null))
  14. {
  15. //do the actual transform of Xml
  16. myXslTrans.Transform(myXPathDoc,null, myWriter);
  17. }
  18. }
Add Comment
Please, Sign In to add comment