Skip to content
Advertisement

Tag: pretty-print

How to pretty print a complex Java object (e.g. with fields that are collections of objects)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 5 years ago. The community reviewed whether to reopen this question 4 months ago and left it

How to pretty print XML from Java?

I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this? Note: My input is a String. My output is a String. (Basic) mock result: Answer Now it’s 2012 and Java can do more than it used to with

Advertisement