Direct results of Transformation

  • Thread starter Thread starter Mark Goldin
  • Start date Start date
M

Mark Goldin

I have this line in my code:

xslt.Transform(new
XPathDocument("D:\\testarea\\dotnet\\processtree\\TIPTREECAT.xml"), xslArg,
writer, null);

How can store results of the transformation into a string?
 
Please see if the following helps
XPathDocument xpathDoc = new XPathDocument(Server.MapPath("MyXml.xml"))
XslTransform xTran = new XslTransform()
xTran.Load(Server.MapPath("myxsl.xsl"))
string HtmlOutput
StringWriter sw = new StringWriter()
xTran.Transform(xpathDoc,null,sw,null)
HtmlOutput = sw.ToString()

Regards
-am
 
Back
Top