473,378 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Transfrom Memory XML and send output to client

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 :-)

Jan 25 '06 #1
0 942

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jacinle Young | last post by:
Hi, I need to merge XML from different sources to 1 XML file. I am wondering if XSLT could do this job as usually it is used to perform 1 to 1 file transfrom eg. src1.xml <?xml...
2
by: Sambucus | last post by:
Hi group! I am using C++ and java with JNI to get some text in a RICHEDIT to my java program. I do so by accessing a C++ method every second. It all works fine except that it leaks memory every...
2
by: Mike | last post by:
I'm getting a strange result when I reference an external xml document in my XSLT. The transformation work's fine in Xselerator, but not in .NET. It looks as though I'm getting garbage in the...
6
by: Tom | last post by:
I try to write a simple tcp based job queue server. It's purpose is to get commands from a client and store them in a queue (STL). The server has a thread which checks periodically the queue,...
3
by: Giovanni Boschi | last post by:
We have found a memory leak when using a COM library with a C# application. The leak appears only if the C# application is compiled with the /optimize flag. It goes away when the C# application is...
0
by: Skyruner2 | last post by:
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...
3
by: Newbie27 | last post by:
Hi everyone. I am new to programming and trying to learn as I go however am struggling here and any assistance please I greatly appreciate. I am trying to send hardcoded xml tags to a server that...
10
by: Elaine121 | last post by:
Hi i've been batteling for hours and can't seem to find the problem. When my server runs and I press the connect button the gui freezes until the client gui is terminated.. only then the gui becomes...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.