[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to save output of XSLT to file

Subject: RE: How to save output of XSLT to file
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Wed, 26 Jan 2005 10:11:48 -0600
xsl save file
Hi Thadthong,

Following is an example I used on ASP.NET 1.x, with the XML Web server
control which is capable o doing transformations XSLT 1.0. First, an xml
source is loaded into an XmlDocument using a SQL Query Template, which
executes a SQL query and returns the data in xml format. Then, the snippet
that starts with XmlTextWriter shows how to persist the output to disk in
ASP.NET. Finally, the XML Web Server contol is used to perform the
transformation and show the output on the screen.

string strUrlXmlTemplateArticle = "http://" +
System.Configuration.ConfigurationSettings.AppSettings["strLocalHost"] +
"/docnet2/templates/tmpl.xml";
XmlDocument doc = new XmlDocument();
doc.Load(strUrlXmlTemplateArticle);
			
XmlTextWriter writer = new
XmlTextWriter(Server.MapPath("/docnet/xml/tmpl.xml"),
System.Text.Encoding.UTF8);
writer.Formatting = Formatting.Indented;
writer.Indentation = 2;
doc.Save(writer);
writer.Close();
				
XmlOD.Document = doc;
XmlOD.Transform = (XslTransform)Cache["aplXslTransform"];

HTH,
<prs/>

-----Original Message-----
From: Thadthong Bhrammanee [mailto:st018570@xxxxxxxxx] 
Sent: Wednesday, January 26, 2005 6:58 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  How to save output of XSLT to file 



Hi,

I'm using asp.net (let's say "tran.aspx") for displaying the transformation
outputs (one in text and one in html, according to <xsl:output
method="..">).

Please advice the way I can save those transformation outputs to new files
(e.g., saved.txt).

I appreciate your advice.

J.



----------------------------------------------------------
This mail sent through AIT WebMail : http://www.ait.ac.th/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.