l.s.x.XMLValidator : class documentation

Part of lp.services.xml View In Hierarchy

Known subclasses: lp.services.xml.RelaxNGValidator

A validator for XML files against a schema.
Method __init__ Create a validator instance.
Method validate Validate the string xml
Method error_log A string with the errors detected by the validator.
def __init__(self, schema_filename):
Create a validator instance.
Parametersschema_filenameThe name of a file containing the schema.
def validate(self, xml):
Validate the string xml
ReturnsTrue, if xml is valid, else False.
@property
def error_log(self):
A string with the errors detected by the validator.

Each line contains one error; if the validation was successful, error_log is the empty string.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.