Outputting XML using XSLT transformation
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jyri_Saastamoinen
Posted On:   Monday, August 2, 2004 12:22 AM

How can I output XML file when I first make a transformation?

			
Source xmlSource = new StreamSource(xmlFile);
Source xsltSource = new StreamSource(xsltFile);

TransformerFactory transFact = TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource);

trans.transform(xmlSource, new StreamResult(new FileOutputStream(...)));


Is it ok if I put just new xml file to FileOutputStream?

Re: Outputting XML using XSLT transformation

Posted By:   varadarajan_Anand  
Posted On:   Monday, August 2, 2004 01:12 AM

Hi:

The XML can be directly output to the HttpResponse as you do for HTML. That should work fine.
About | Sitemap | Contact