|
Java™ by example!
|
|
|
How do I pretty-print an XML?
Imagine you want to format the following xml in a human-friendly format: test.xml:
You can do this using the XSLT transformer package. Working code sample: Main.java:
outputs:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|