|
xmlwrapp
Lightweight C++ XML parsing library
|
XML validator using RelaxNG. More...
#include <relaxng.h>
Public Member Functions | |
| relaxng (const document &doc, error_handler &on_error=throw_on_error) | |
| Parses XML RelaxNG document and creates relaxng instance from it. More... | |
| ~relaxng () | |
| Destructor. More... | |
| bool | validate (const document &doc, error_handler &on_error=throw_on_error) const |
| Validates the document doc against the relaxng. More... | |
XML validator using RelaxNG.
This class is used to validate documents against RelaxNG schemas expressed in XML syntax (compact RelaxNG syntax is not supported).
|
explicit |
Parses XML RelaxNG document and creates relaxng 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 relaxng from being loaded and the error handler doesn't throw an exception, the constructor will throw xml::exception anyway.
| xml::relaxng::~relaxng | ( | ) |
Destructor.
| bool xml::relaxng::validate | ( | const document & | doc, |
| error_handler & | on_error = throw_on_error |
||
| ) | const |
Validates the document doc against the relaxng.
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 relaxng, false otherwise.
1.8.18