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

Re: method transform (JAXP)

Subject: Re: method transform (JAXP)
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 8 May 2008 17:29:36 +0530
Re:  method transform (JAXP)
After quickly looking at the Java APIs, following comes to my mind:

StringWriter sw = new StringWriter();
StreamResult sr = new StreamResult(sw);
transformer.transform(new StreamSource(sourceId), sr);
StringBuffer sb = sr.getBuffer();

This has not been tested.

On 5/8/08, IZASKUN GUTIERREZ GUTIERREZ <igutierrez027@xxxxxxxxxxxxx> wrote:
> Hello everybody!
> I am using JAXP to execute templates.In the method transformer.transform ,
> the
> second parameter is one StreamResult. I can obtain the result in a File like
> this:
> File output = new File
> ("C:/Users/Izaskun/Desktop/workspace5/modelo/mayo.txt");
> transformer.transform(new StreamSource(sourceId), new StreamResult(output));
> I need to obtain the result in a var String because the result is only one
> line
>  and I dont know how to do it, because I tried a lot of forms but I dont
> obtain
> this.
> Could anybody help me?
> Regards,
> Izaskun

Mukul Gandhi

Current Thread


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.
First Name
Last Name
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.