xmllint is a command-line validator for XML.
xmllint is a command-line interface to libxml2 (See http://www.xmlsoft.org/), which is a set of portable (linux, windows, solaris, etc) libraries for manipulating XML. Implemented in C, there are libxml bindings for many languages including Perl, PHP, C++. Ruby and Tcl. By-in-large bugs in the core libraries affect all the platforms, with each new plaform having a few platfrom-specific bugs.
Please sign all comments.
Source code and licensing
Support for TEI
Sebastian Rahtz reported on TEI-L, "the RELAXNG support in xmllint has historically had issues with TEI schemas. I never got to the bottom of it, but certainly it does not always work. I don't have any workaround to suggest, apart from saying it may work with a simpler schema. I would suggest you look at the Java-based Jing for this work, or generate a DTD and then use xmllint."