Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pretty print ON/OFF #54

Open
yegor256 opened this issue Mar 10, 2015 · 6 comments
Open

pretty print ON/OFF #54

yegor256 opened this issue Mar 10, 2015 · 6 comments

Comments

@yegor256
Copy link
Owner

Let's make it possible to switch pretty print of XML output ON and OFF

@davvd davvd added the bug label Mar 11, 2015
@davvd
Copy link

davvd commented Mar 11, 2015

@yegor256 got it, tag bug is here

@davvd
Copy link

davvd commented Mar 11, 2015

@yegor256 thanks for the ticket, your account was topped for 15 mins, payment 000-bf7ecd3c

@urbansky
Copy link

There is only one line missing in xml() to do this.

transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");

see: https://stackoverflow.com/questions/1264849/pretty-printing-output-from-javax-xml-transform-transformer-with-only-standard-j

@rafaferreira
Copy link

rafaferreira commented Dec 1, 2019

Came here for the same, I need to disable the IDENT.

I'm using this workaround:
.replaceAll("(?m)^\s+", "");

Suggestion on the API to add a parameter here to ident or not? when doing a .XML

@paulodamaso
Copy link

@yegor256 ping

@yegor256
Copy link
Owner Author

yegor256 commented Aug 5, 2020

@paulodamaso interested in providing a pull request? @rafaferreira @urbansky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants