Hi,
I have this code that will write the transformed XML immediately to the browser with the Response object..
XslTransform trans = new XslTransform()
trans.Load(MapPath("MyXsl.xsl"))
trans.Transform(oXmlDataDocument, null, Response.OutputStream, null); //Writes immediately to browser her
But if I wanted to return the transformation as a variable and not immediately to the browser, the only way I found to do this was using the XmlReader below..
XmlUrlResolver resolver = new XmlUrlResolver()
XmlReader reader = trans.Transform(oXmlDataDocument, null, resolver)
while (reader.Read())
//Build the XML string here...
Is the XmlReader considered efficient enough or is there another "Stream" type object that I can use instead of the Response.OutputStream and just "flush" to the browser when I'm ready
I've tried declaring a StreamReader or Stream but it wants parameters in the constructor
Any code on this would be helpful. Dave.