Feb 18, 2008

asp.net xslt output

XslTransform xslt = new System.Xml.Xsl.XslTransform();             xslt.Load(xslFile);  
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
StringWriter writer = new StringWriter();
XmlTextWriter xmlwriter = new XmlTextWriter(writer);
XsltArgumentList list = new XsltArgumentList();
list.AddParam("Age", "", "108");
xslt.Transform(doc, list, xmlwriter);
xmlwriter.Close();
writer.Close();
Response.Write(writer.ToString());
writer.Dispose();
Response.Flush();
Response.Close();