Represents an XSD schema for validating XML files.
More...
#include <libxml++/xsdschema.h>
|
| XsdSchema () |
|
| XsdSchema (_xmlSchema * schema) |
| Create a schema from the underlying libxml schema element.
|
|
| XsdSchema (const Document * document) |
| Create a schema from an XML document.
|
|
| XsdSchema (const Glib::ustring & filename) |
| Create a schema from a schema definition file.
|
|
| ~XsdSchema () override |
|
_xmlSchema * | cobj () |
| Access the underlying libxml implementation.
|
|
const _xmlSchema * | cobj () const |
| Access the underlying libxml implementation.
|
|
void | parse_document (const Document * document) override |
| Parse a schema definition from a document.
|
|
void | parse_file (const Glib::ustring & filename) override |
| Parse a schema definition file.
|
|
void | parse_memory (const Glib::ustring & contents) override |
| Parse a schema definition from a string.
|
|
| SchemaBase () |
|
| ~SchemaBase () override |
|
Represents an XSD schema for validating XML files.
XSD = XML Schema Definition, a.k.a. XML Schema or W3C XML Schema
- Since libxml++ 2.38:
◆ XsdSchema() [1/4]
xmlpp::XsdSchema::XsdSchema |
( |
| ) |
|
◆ XsdSchema() [2/4]
xmlpp::XsdSchema::XsdSchema |
( |
_xmlSchema * |
schema | ) |
|
|
explicit |
Create a schema from the underlying libxml schema element.
- Parameters
-
schema | A pointer to the libxml schema element. The XsdSchema takes ownership of the _xmlSchema. The caller must not deallocate it. |
◆ XsdSchema() [3/4]
xmlpp::XsdSchema::XsdSchema |
( |
const Glib::ustring & |
filename | ) |
|
|
explicit |
Create a schema from a schema definition file.
- Parameters
-
filename | The URL of the schema. |
- Exceptions
-
◆ XsdSchema() [4/4]
xmlpp::XsdSchema::XsdSchema |
( |
const Document * |
document | ) |
|
|
explicit |
Create a schema from an XML document.
- Parameters
-
document | A preparsed document tree, containing the schema definition. |
- Exceptions
-
◆ ~XsdSchema()
xmlpp::XsdSchema::~XsdSchema |
( |
| ) |
|
|
override |
◆ cobj() [1/2]
_xmlSchema * xmlpp::XsdSchema::cobj |
( |
| ) |
|
Access the underlying libxml implementation.
◆ cobj() [2/2]
const _xmlSchema * xmlpp::XsdSchema::cobj |
( |
| ) |
const |
Access the underlying libxml implementation.
◆ parse_context()
void xmlpp::XsdSchema::parse_context |
( |
_xmlSchemaParserCtxt * |
context | ) |
|
|
protected |
◆ parse_document()
void xmlpp::XsdSchema::parse_document |
( |
const Document * |
document | ) |
|
|
overridevirtual |
Parse a schema definition from a document.
If another schema has been parsed before, that schema is replaced by the new one.
- Parameters
-
document | A preparsed document tree, containing the schema definition. |
- Exceptions
-
Implements xmlpp::SchemaBase.
◆ parse_file()
void xmlpp::XsdSchema::parse_file |
( |
const Glib::ustring & |
filename | ) |
|
|
overridevirtual |
Parse a schema definition file.
If another schema has been parsed before, that schema is replaced by the new one.
- Parameters
-
filename | The URL of the schema. |
- Exceptions
-
Implements xmlpp::SchemaBase.
◆ parse_memory()
void xmlpp::XsdSchema::parse_memory |
( |
const Glib::ustring & |
contents | ) |
|
|
overridevirtual |
Parse a schema definition from a string.
If another schema has been parsed before, that schema is replaced by the new one.
- Parameters
-
contents | The schema definition as a string. |
- Exceptions
-
Implements xmlpp::SchemaBase.
◆ release_underlying()
void xmlpp::XsdSchema::release_underlying |
( |
| ) |
|
|
protected |