To verify if an XML document is corrupted or not
$ xmllint sample.xml
To suppress the xmllint from printing the content of XML file to standard output
$ xmllint --noout sample.xml
To format the unformatted xml file
$ xmllint --format unformatted.xml
To reformat XML document with an four-space indent
$ export XMLLINT_INDENT=" " # (four space)
To remove the indentation spaces and newlines using xmllint
$ xmllint --noblanks sample.xml
To remove Document Type Definition from output from xml
$ xmllint --dropdtd sample.xml
To get a time profile
$ xmllint --noout --timing sample.xml
regards,
T.Dhanasekar