PC Review


Reply
Thread Tools Rate Thread

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

 
 
Skyruner2
Guest
Posts: n/a
 
      25th Jan 2006
hi,
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)
{
xmlDoc.Load(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"));


test.Deploy(false,Server.MapPath("test/XSLTFile.xsl"),Response.OutputStream);
am);



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
fine.

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


Thanks :-)

--
10100111001
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Output client name based on date... Ted McCastlain Microsoft Excel Worksheet Functions 0 5th Sep 2006 09:15 PM
Transfrom Memory XML and send output to client Skyruner2 Microsoft ASP .NET 0 25th Jan 2006 02:37 PM
Intercepting the rendered output before it goes to the client Nick Microsoft ASP .NET 2 15th Jan 2004 09:24 PM
Print output differs via W2K client and Win '95 or '98 client JJay Microsoft Windows 2000 Printing 0 9th Dec 2003 12:07 PM
What does Transfrom-Pivot do? Microsoft Access 1 22nd Oct 2003 09:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:35 PM.