Xml schema validating parser
In addition you also get support for Schematron and Relax NG. Update 1/13/2012: The command line tool is free to use and uses Xerces as XML parser. But if you are missing an attribute in the XML you just get a message saying the element can not be validated.
I'm working on some very complicated XML with very complicated rules, and I'm new to this so tracking down which attribute is missing is taking a long time. It can be run from the command line like xmllint and it supports RELAX NG: https://java.net/ I found this online validator from 'corefiling' quite useful - After trying few tools to validate my xsd, this is the one which gave me detailed error info - so I was able to fix the error in schema.
XML schema is supported in a similar way, but requires an explicit schema to be provided: As described above, the parser support for DTDs depends on internal or external subsets of the XML file.
This means that the XML file itself must either contain a DTD or must reference a DTD to make this work.
lxml also provides support for ISO-Schematron, based on the pure-XSLT skeleton implementation of Schematron: There is also basic support for The parser in lxml can do on-the-fly validation of a document against a DTD or an XML schema.
The DTD is retrieved automatically based on the DOCTYPE of the parsed document.
This option gives you both real-time validation AND autocomplete, which is just awesome.All you have to do is use a parser that has DTD validation enabled: option, which loads the DTD and weaves attribute default values into the document.Again, no validation is performed unless explicitly requested.It will only contain log entries that appeared during the validation.Similar to XSLT, there's also a less efficient but easier shortcut method to do one-shot Relax NG validation: lxml.etree also has XML Schema (XSD) support, using the class lxml.etree. The API is very similar to the Relax NG and DTD classes.