libxml++ 2.40.1

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
xmlpp::XsdSchema Class Reference

Represents an XSD schema for validating XML files. More...

`#include <libxml++/xsdschema.h>`

Inheritance diagram for xmlpp::XsdSchema:
[legend]

## Public Member Functions
| XsdSchema ()
| XsdSchema (_xmlSchema* schema)
| Create a schema from the underlying libxml schema element. More...
| XsdSchema (const Glib::ustring& filename)
| Create a schema from a schema definition file. More...
| XsdSchema (const Document* document)
| Create a schema from an XML document. More...
| ~XsdSchema () override
_xmlSchema* | cobj ()
| Access the underlying libxml implementation. More...
const _xmlSchema* | cobj () const
| Access the underlying libxml implementation. More...
void | parse_document (const Document* document) override
| Parse a schema definition from a document. More...
void | parse_file (const Glib::ustring& filename) override
| Parse a schema definition file. More...
void | parse_memory (const Glib::ustring& contents) override
| Parse a schema definition from a string. More...
Public Member Functions inherited from xmlpp::SchemaBase
| SchemaBase ()
| ~SchemaBase () override

## Protected Member Functions
void | parse_context (_xmlSchemaParserCtxt* context)
void | release_underlying ()

## Detailed Description

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:

## Constructor & Destructor Documentation

xmlpp::XsdSchema::XsdSchema | ( |  | ) |

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.

xmlpp::XsdSchema::XsdSchema | ( | const Glib::ustring & | filename | ) |
| explicit

Create a schema from a schema definition file.

Parameters

  filename | The URL of the schema.

Exceptions

  xmlpp::parse_error |

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

  xmlpp::parse_error |

xmlpp::XsdSchema::~XsdSchema | ( |  | ) |
| override

## Member Function Documentation

_xmlSchema* xmlpp::XsdSchema::cobj | ( |  | ) |

Access the underlying libxml implementation.

const _xmlSchema* xmlpp::XsdSchema::cobj | ( |  | ) | const

Access the underlying libxml implementation.

void xmlpp::XsdSchema::parse_context | ( | _xmlSchemaParserCtxt * | context | ) |
| protected

void xmlpp::XsdSchema::parse_document | ( | const Document* | document | ) |
| override virtual

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

  xmlpp::parse_error |

Implements xmlpp::SchemaBase.

void xmlpp::XsdSchema::parse_file | ( | const Glib::ustring & | filename | ) |
| override virtual

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

  xmlpp::parse_error |

Implements xmlpp::SchemaBase.

void xmlpp::XsdSchema::parse_memory | ( | const Glib::ustring & | contents | ) |
| override virtual

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

  xmlpp::parse_error |

Implements xmlpp::SchemaBase.

void xmlpp::XsdSchema::release_underlying | ( |  | ) |
| protected