/ Published in: C#

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using System.Xml; using System.Xml.Xsl; using System.Xml.XPath; using System.IO; private string ApplyXSLTransformation() { string strHtml; string strXstFile = Server.MapPath("my-xsl.xslt"); // Load the XML // Load the style sheet. xslt.Load(strXstFile); xslt.Transform(doc, writer); ms.Position = 0; strHtml = rd.ReadToEnd(); rd.Close(); ms.Close(); return strHtml; }
Comments
