File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Make it so: Java DB Connections & Transactions
this week in the
XML and Related Technologies
XSLT transformer formatting
Joined: Aug 12, 2006
Oct 13, 2006 11:53:00
I'm using an XSLT transformer to output my XML data on System.out.
Everything is printed on one line, no new lines.
Is it possible to configure the transformer to print pretty (new lines, maybe even indented)?
Here's what I have now:
TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(); DOMSource source = new DOMSource(document); StreamResult result = new StreamResult(System.out); transformer.transform(source,result);
I agree. Here's the link:
subject: XSLT transformer formatting
redirect XML/DOM output to file??
Writing XML File via Java Program
xml output formatting
Special Characters in XML
Convert SOAP response to SOAP XmL string using JAX WS
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015