xmlwrapp
Lightweight C++ XML parsing library
|
XML Schema. More...
#include <schema.h>
Public Member Functions | |
schema (const document &doc, error_handler &on_error=throw_on_error) | |
Parses XML Schema document and creates schema instance from it. More... | |
~schema () | |
Destructor. More... | |
bool | validate (const document &doc, error_handler &on_error=throw_on_error) const |
Validates the document doc against the schema. More... | |
XML Schema.
This class is used to validate documents against XML Schema.
|
explicit |
Parses XML Schema document and creates schema instance from it.
Errors are handled by on_error handler; by default, xml::exception is thrown on errors. If there's a fatal error that prevents the schema from being loaded and the error handler doesn't throw an exception, the constructor will throw xml::exception anyway.
xml::schema::~schema | ( | ) |
Destructor.
bool xml::schema::validate | ( | const document & | doc, |
error_handler & | on_error = throw_on_error |
||
) | const |
Validates the document doc against the schema.
Errors are handled by on_error handler; by default, xml::exception is thrown on errors.
true
if the document is valid with regard to the schema, false
otherwise.