1

I need a command-line XML pretty-printer tool that will not overflow given output line width.

All tools I've tried (xmlstarlet, xmllint, xmlindent) overflow line width when printing tags with many attributes. I'll settle if each attribute will be printed at a separate line (while keeping indentation of course).

Tool must be free, runnable on Linux and, preferably, have an Ubuntu package. However, I'll settle for a downloadable library.

Any clues?

1 Answer 1

2

HTML Tidy with -xml will reformat XML.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, it almost works. However I see gives incorrect indentation for the tag right after CDATA. Is it a known issue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.