I am using StAX XML stream writer to write the XML file. It writes all the data in a single line. I want all the tags to be indented instead of a single line.
stax-utils provides class IndentingXMLStreamWriter which does the job:
IndentingXMLStreamWriter
XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(...); writer = new IndentingXMLStreamWriter(writer); ...
1.4m articles
1.4m replys
5 comments
56.9k users