471,317 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

ASP.net: Transfrom Memory XML and send output to client

I want to load an XML, and XSL file and then send the transformed XML to the
client browser. i have tried this:

//the classes
public abstract class XMLWorker
protected XmlDocument xmlDoc = new XmlDocument();
protected XMLWorker()
public sealed class XMLPageCore : XMLWorker
public XMLPageCore(string Path2BaseXML)

public void Deploy(string XSLTPath,System.IO.Stream Stream)
System.Xml.Xsl.XslCompiledTransform ledTransform XSLT = new
System.Xml.Xsl.XslCompiledTransform(); default: XSLT.Load(XSLTPath);
XSLT.Transform(xmlDoc.DocumentElement,null,Stream) ;

//The call

XMLPageCore test = new XMLPageCore(Server.MapPath("test/XMLFile.xml"));

on the page though, i get the XML Processing Instructions <?.. and then all
of the xml content w/o any tags or whitespace. but if i use the overload of
xslt.transform that will take the input and output files as parameter (
XSLT.Transform("test/XMLFile.xml","test/XSLTFile.xsl"); ), it works just

I have also tried it with Stream as System.IO.TextWriter and thus passing
Response.Output and not Response.OutputStream .
Thanks :-)

Jan 25 '06 #1
0 994

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.