XML Schema Validator.
More...
#include <libxml++/validators/schemavalidator.h>
◆ SchemaValidator() [1/4]
LIBXMLPP_API xmlpp::SchemaValidator::SchemaValidator |
( |
| ) |
|
◆ SchemaValidator() [2/4]
LIBXMLPP_API xmlpp::SchemaValidator::SchemaValidator |
( |
const Glib::ustring & |
file | ) |
|
|
explicit |
Create a validator and parse a schema definition file immediately.
- Parameters
-
file | The URL of the schema. |
- Exceptions
-
- Deprecated:
- Use XsdValidator instead.
◆ SchemaValidator() [3/4]
LIBXMLPP_API xmlpp::SchemaValidator::SchemaValidator |
( |
Document & |
document | ) |
|
|
explicit |
Create a validator and parse a schema definition document immediately.
- Parameters
-
document | A preparsed document tree, containing the schema definition. |
- Note
- The document may be modified during the parsing process.
- Exceptions
-
- Deprecated:
- Use XsdValidator instead.
◆ SchemaValidator() [4/4]
LIBXMLPP_API xmlpp::SchemaValidator::SchemaValidator |
( |
Schema * |
schema | ) |
|
|
explicit |
Create a schema validator.
- Parameters
-
schema | A pointer to the XML schema to use when validating XML documents. The validator does not take ownership of the schema. The caller must guarantee that the schema exists as long as the validator keeps a pointer to it. The caller is responsible for deleting the schema when it's no longer needed. |
- Deprecated:
- Use XsdValidator instead.
◆ ~SchemaValidator()
LIBXMLPP_API xmlpp::SchemaValidator::~SchemaValidator |
( |
| ) |
|
|
override |
◆ get_schema() [1/2]
LIBXMLPP_API Schema* xmlpp::SchemaValidator::get_schema |
( |
| ) |
|
◆ get_schema() [2/2]
LIBXMLPP_API const Schema* xmlpp::SchemaValidator::get_schema |
( |
| ) |
const |
◆ initialize_valid()
LIBXMLPP_API void xmlpp::SchemaValidator::initialize_valid |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ operator bool()
LIBXMLPP_API xmlpp::SchemaValidator::operator bool |
( |
| ) |
const |
◆ parse_context()
LIBXMLPP_API void xmlpp::SchemaValidator::parse_context |
( |
_xmlSchemaParserCtxt * |
context | ) |
|
|
protected |
◆ parse_document()
virtual LIBXMLPP_API void xmlpp::SchemaValidator::parse_document |
( |
Document & |
document | ) |
|
|
virtual |
Parse a schema definition from a document.
If the validator already contains a schema, that schema is released (deleted if the validator owns the schema).
- Parameters
-
document | A preparsed document tree, containing the schema definition. |
- Note
- The document may be modified during the parsing process.
- Exceptions
-
- Deprecated:
- Use XsdValidator::parse_document() instead.
◆ parse_file()
virtual LIBXMLPP_API void xmlpp::SchemaValidator::parse_file |
( |
const Glib::ustring & |
filename | ) |
|
|
virtual |
Parse a schema definition file.
If the validator already contains a schema, that schema is released (deleted if the validator owns the schema).
- Parameters
-
filename | The URL of the schema. |
- Exceptions
-
- Deprecated:
- Use XsdValidator::parse_file() instead.
◆ parse_memory()
virtual LIBXMLPP_API void xmlpp::SchemaValidator::parse_memory |
( |
const Glib::ustring & |
contents | ) |
|
|
virtual |
Parse a schema definition from a string.
If the validator already contains a schema, that schema is released (deleted if the validator owns the schema).
- Parameters
-
contents | The schema definition as a string. |
- Exceptions
-
- Deprecated:
- Use XsdValidator::parse_memory() instead.
◆ release_underlying()
LIBXMLPP_API void xmlpp::SchemaValidator::release_underlying |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ set_schema()
virtual LIBXMLPP_API void xmlpp::SchemaValidator::set_schema |
( |
Schema * |
schema | ) |
|
|
virtual |
Set a schema.
If the validator already contains a schema, that schema is released (deleted if the validator owns the schema).
- Parameters
-
schema | A pointer to the XML schema to use when validating XML documents. The validator does not take ownership of the schema. The caller must guarantee that the schema exists as long as the validator keeps a pointer to it. The caller is responsible for deleting the schema when it's no longer needed. |
- Deprecated:
- Use XsdValidator::set_schema() instead.
◆ validate() [1/2]
LIBXMLPP_API bool xmlpp::SchemaValidator::validate |
( |
const Document * |
doc | ) |
|
◆ validate() [2/2]
LIBXMLPP_API bool xmlpp::SchemaValidator::validate |
( |
const Glib::ustring & |
file | ) |
|
◆ ctxt_
_xmlSchemaValidCtxt* xmlpp::SchemaValidator::ctxt_ |
|
protected |
◆ embbeded_shema_
bool xmlpp::SchemaValidator::embbeded_shema_ |
|
protected |
◆ schema_
Schema* xmlpp::SchemaValidator::schema_ |
|
protected |