Command line XML validator

I have always used the W3Schools On-line XML validator, but have always found it unreliable and I’ve never got it to validate against an XML schema file.

Thanks to Google I came across the following command (part of libxml2-utils):

$ xmllint --noout --schema schema.xsd file.xml

I find it amazing that all this time I had the perfect command pre-installed on my Linux desktop and I never knew.

comments powered by Disqus