Question about validating xml by its schema
zuberc-cds opened this issue · 1 comments
zuberc-cds commented
Hello,
In lxml to validate an xml, we can parse it and use validate function to validate by schema. This schema can be get by RelaxNG.
The question is how do I validate an xml using defusedxml? And also print errors when the given xml is invalid.
Thanks
tiran commented
defusedxml is a wrapper around Python's xml package, which itself uses the expat library. The expat library does not support RelaxNG. You have to use lxml for advanced features.