Transforming xml using xslt into a string variable?

K

Ken Adams

So basically I run the Transformer using my xslt file on an xml file and I
want to get the data that was returned to be put directly into a String
variable. How would I do this?

Thanks
 
A

Arnaud Berger

Hi,

if you are using javax.xml.transform.Transformer, you just have to specify
your
Result object as a new StreamResult(new StringWriter())

Regards,

Arnaud
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top