-
put html into string
i'm trying to maniulate an xml file using xslt to produce some html.
that bit is fine, and i've printed the results to the console. But what i would like to do is be able to pass the results from the transform into a string variable. but i'm not sure how to convert the stream into a string.
Code:
public class Form1
{
private const String filename = "Email.xml";
private const String stylesheet = "Email.xsl";
public static void Main()
{
XslTransform xslt = new XslTransform();
xslt.Load(stylesheet);
XPathDocument xpathdocument = new XPathDocument(filename);
XmlTextWriter writer = new XmlTextWriter(Console.Out );
writer.Formatting=Formatting.Indented;
xslt.Transform(xpathdocument, null, writer, null);
}
}