Reputation: 195
By default xmllint appears to indent by 2 spaces, Is there a way to change the level of indentation on Windows?
Upvotes: 14
Views: 10244
Reputation: 10217
I think you need to set the environment variable $XMLLINT_INDENT
to be whatever you need (e.g. if you want 4 spaces use four spaces " "). From the docs:
$XMLLINT_INDENT environment variable controls the indentation (default value is two spaces " ")
You then need to run it with the --format
flag. e.g.:
xmllint --format my_file_name.xml
Upvotes: 28