Tagged: xmllint

Validating XML Schema document itself


$ wget https://www.w3.org/2001/XMLSchema.xsd
$ xmllint --schema XMLSchema.xsd some.xsd
Advertisements

formatting XML in console


user@host:~$ cat xml.xml
<a><b>c</b></a>

user@host:~$ xmllint xml.xml
<?xml version="1.0"?>
<a><b>c</b></a>

user@host:~$ cat xml.xml | xmllint --format -
<?xml version="1.0"?>
<a>
  <b>c</b>
</a>

user@host:~$