Closed jnussbaum closed 3 days ago
Hi,
thank you for appreciations :sweat_smile: ...
To obtain all errors listify the errors returned by iter_errors()
API:
schema = xmlschema.XMLSchema11("schema.xsd")
errors = list(schema.iter_errors("data.xml"))
Furthermore, if you need to decode XML data the decode()
API has a lax validation mode that returns decoded data and the list of errors:
schema = xmlschema.XMLSchema11("schema.xsd")
data, errors = schema.decode("data.xml", validation='lax')
Thank you very much for your reply, and sorry that I didn't see this myself in the documentation.
Hi
First, thanks for your nice package! It's the only XML validator I know that supports XSD 1.1 😄
I have a question: Currently, we use XSD 1.0, and
lxml.etree.XMLSchema
as our validator. That package has the advantage that if there are several validation errors, it has anerror_log
that you can iterate over. I didn't find an equivalent for this in your package.Is there a way how to aggregate several errors with your package?
This is my code:
Thanks in advance for your help 😃