[lxml-dev] Verbose validation error messages?
Hi, I'm interested in using lxml's validation capabilities. Specifically, I want to validate XML documents according to a RELAX-NG schema. What seems to be missing from the lxml API is the ability to receive verbose validation error messages: The 'validate' method of the RelaxNG class just returns 0 or 1 depending on whether the document validates. The libxml2 library is able to report much more information, such as the exact line number where the validation fails and the reason (as can be seen when using xmllib2's 'xmllint' tool). Are there any plans to add support for this to lxml? It seems like throwing an exception when the validation fails, and add the information to the exception object, would be a clean way to handle this. -- Gavrie
participants (1)
-
Gavrie Philipson