Format XML with xmllint command

Linux / Unix Command: xmllint

xmllint - command line XML tool

xmllint [--version | --debug | --shell | --debugent
| --copy | --recover | --noent | --noout | --htmlout
|--nowrap | --valid | --postvalid | --dtdvalid URL
| --timing | --repeat | --insert | --compress
| --sgml | --html | --push | --memory | --nowarning
| --noblanks | --format | --testIO | --encode encoding
| --catalogs | --nocatalogs | --auto | --xinclude
| --loaddtd | --dtdattr | --dropdtd | --stream
| --chkregister] [xmlfile]

Example:
$xmllint --format summary.xml > ~/Desktop/summary-format.xml

Leave a Reply