Alexander Gladysh
Alexander Gladysh

Reputation: 41393

XML pretty-printer with fixed line-width output

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?

Upvotes: 1

Views: 671

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798626

HTML Tidy with -xml will reformat XML.

Upvotes: 2

Related Questions