libxml++ 2.42.2
xmlpp::Schema Class Reference

Represents an XML Schema. More...

#include <libxml++/schema.h>

Inheritance diagram for xmlpp::Schema:

Public Member Functions

LIBXMLPP_API Schema (_xmlSchema * schema)
 Create a schema from the underlying libxml schema element.
 
LIBXMLPP_API Schema (Document * document=nullptr, bool embed=false)
 Create a schema from an XML document.
 
 ~Schema ()
 
LIBXMLPP_API _xmlSchema * cobj ()
 Access the underlying libxml implementation.
 
LIBXMLPP_API const _xmlSchema * cobj () const
 Access the underlying libxml implementation.
 
LIBXMLPP_API Documentget_document ()
 Get the schema document.
 
LIBXMLPP_API const Documentget_document () const
 Get the schema document.
 
LIBXMLPP_API Glib::ustring get_name () const
 
LIBXMLPP_API Glib::ustring get_target_namespace () const
 
LIBXMLPP_API Glib::ustring get_version () const
 
virtual LIBXMLPP_API void set_document (Document * document=nullptr, bool embed=false)
 Set a new document to the schema.
 

Protected Member Functions

virtual LIBXMLPP_API void release_underlying ()
 

Detailed Description

Represents an XML Schema.

Since libxml++ 2.24
Deprecated
Use XsdSchema instead.

Constructor & Destructor Documentation

◆ Schema() [1/2]

LIBXMLPP_API xmlpp::Schema::Schema ( _xmlSchema * schema)
explicit

Create a schema from the underlying libxml schema element.

Deprecated
Use XsdSchema instead.

◆ Schema() [2/2]

LIBXMLPP_API xmlpp::Schema::Schema ( Document * document = nullptr,
bool embed = false )
explicit

Create a schema from an XML document.

Parameters
documentXMLSchema document, nullptr to create an empty schema document.
embedIf true, the document will be deleted when the schema is deleted or another document is set.
Exceptions
xmlpp::parse_error
xmlpp::internal_errorIf an empty schema document can't be created.
Deprecated
Use XsdSchema instead.

◆ ~Schema()

xmlpp::Schema::~Schema ( )

Member Function Documentation

◆ cobj() [1/2]

LIBXMLPP_API _xmlSchema * xmlpp::Schema::cobj ( )

Access the underlying libxml implementation.

Deprecated
Use XsdSchema::cobj() instead.

◆ cobj() [2/2]

LIBXMLPP_API const _xmlSchema * xmlpp::Schema::cobj ( ) const

Access the underlying libxml implementation.

Deprecated
Use XsdSchema::cobj() instead.

◆ get_document() [1/2]

LIBXMLPP_API Document * xmlpp::Schema::get_document ( )

Get the schema document.

Returns
A pointer to the schema document, or nullptr if none exists.
Deprecated
There is no replacement.

◆ get_document() [2/2]

LIBXMLPP_API const Document * xmlpp::Schema::get_document ( ) const

Get the schema document.

Returns
A pointer to the schema document, or nullptr if none exists.
Deprecated
There is no replacement.

◆ get_name()

LIBXMLPP_API Glib::ustring xmlpp::Schema::get_name ( ) const
Deprecated
There is no replacement.

◆ get_target_namespace()

LIBXMLPP_API Glib::ustring xmlpp::Schema::get_target_namespace ( ) const
Deprecated
There is no replacement.

◆ get_version()

LIBXMLPP_API Glib::ustring xmlpp::Schema::get_version ( ) const
Deprecated
There is no replacement.

◆ release_underlying()

virtual LIBXMLPP_API void xmlpp::Schema::release_underlying ( )
protectedvirtual

◆ set_document()

virtual LIBXMLPP_API void xmlpp::Schema::set_document ( Document * document = nullptr,
bool embed = false )
virtual

Set a new document to the schema.

If the old schema document is owned by the schema (embed == true), the old schema document and all its nodes are deleted.

Parameters
documentXMLSchema document, nullptr to create an empty schema document.
embedIf true, the document will be deleted when the schema is deleted or another document is set.
Exceptions
xmlpp::parse_error
xmlpp::internal_errorIf an empty schema document can't be created.
Deprecated
Use XsdSchema::parse_document() instead.