473,396 Members | 1,924 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,396 software developers and data experts.

ASP.net: 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 :-)

--
10100111001
Jan 25 '06 #1
0 1051

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

Similar topics

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...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
9
by: =?Utf-8?B?SG93IHRvIGdldCBhIGNvbW1vbiBuYW1lKENOKSBv | last post by:
Hello.. EveryOne.. i want to use the NET Remote between Server and Client. But it was not good about the CPU Usage and sending time, whie i tested the NET Remote. so i write my code below..
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.