Xmllint indentation level

By default, xmllint seems to be indented by 2 spaces, is there a way to change the indentation level in Windows?

+6
source share
1 answer

I think you need to set the environment variable $XMLLINT_INDENT as you like (for example, if you want 4 spaces to use four spaces ""). From the docs:

The $ XMLLINT_INDENT environment variable controls the indentation (the default value is two spaces "")

Then you need to run it using the --format flag. eg:.

 xmllint --format my_file_name.xml 
+13
source

Source: https://habr.com/ru/post/914553/


All Articles