XML DTD validator.
More...
#include <libxml++/validators/dtdvalidator.h>
|
| | DtdValidator () |
| | DtdValidator (const Glib::ustring & external, const Glib::ustring & system) |
| | Create a validator and parse an external subset (DTD file) immediately.
|
| | DtdValidator (const Glib::ustring & file) |
| | Create a validator and parse an external subset (DTD file) immediately.
|
| | ~DtdValidator () override |
| Dtd * | get_dtd () |
| | Get the parsed DTD.
|
| const Dtd * | get_dtd () const |
| | Get the parsed DTD.
|
| | operator bool () const |
| | Test whether a DTD has been parsed.
|
| virtual void | parse_file (const Glib::ustring & filename) |
| | Parse an external subset (DTD file).
|
| virtual void | parse_memory (const Glib::ustring & contents) |
| | Parse a DTD from a string.
|
| virtual void | parse_stream (std::istream & in) |
| | Parse a DTD from a stream.
|
| virtual void | parse_subset (const Glib::ustring & external, const Glib::ustring & system) |
| | Parse an external subset (DTD file).
|
| bool | validate (const Document * doc) |
| | Validate a document, using a previously parsed DTD.
|
| | Validator () |
| | ~Validator () override |
◆ DtdValidator() [1/3]
| xmlpp::DtdValidator::DtdValidator |
( |
| ) |
|
◆ DtdValidator() [2/3]
| xmlpp::DtdValidator::DtdValidator |
( |
const Glib::ustring & | file | ) |
|
|
explicit |
Create a validator and parse an external subset (DTD file) immediately.
- Parameters
-
- Exceptions
-
◆ DtdValidator() [3/3]
| xmlpp::DtdValidator::DtdValidator |
( |
const Glib::ustring & | external, |
|
|
const Glib::ustring & | system ) |
|
explicit |
Create a validator and parse an external subset (DTD file) immediately.
- Parameters
-
| external | The external ID of the DTD. |
| system | The URL of the DTD. |
- Exceptions
-
◆ ~DtdValidator()
| xmlpp::DtdValidator::~DtdValidator |
( |
| ) |
|
|
override |
◆ get_dtd() [1/2]
| Dtd * xmlpp::DtdValidator::get_dtd |
( |
| ) |
|
Get the parsed DTD.
- Returns
- A pointer to the parsed DTD, or nullptr.
◆ get_dtd() [2/2]
| const Dtd * xmlpp::DtdValidator::get_dtd |
( |
| ) |
const |
Get the parsed DTD.
- Returns
- A pointer to the parsed DTD, or nullptr.
◆ operator bool()
| xmlpp::DtdValidator::operator bool |
( |
| ) |
const |
Test whether a DTD has been parsed.
◆ parse_file()
| virtual void xmlpp::DtdValidator::parse_file |
( |
const Glib::ustring & | filename | ) |
|
|
virtual |
Parse an external subset (DTD file).
If the validator already contains a DTD, that DTD is deleted.
- Parameters
-
| filename | The URL of the DTD. |
- Exceptions
-
◆ parse_memory()
| virtual void xmlpp::DtdValidator::parse_memory |
( |
const Glib::ustring & | contents | ) |
|
|
virtual |
Parse a DTD from a string.
If the validator already contains a DTD, that DTD is deleted.
- Parameters
-
| contents | The DTD as a string. |
- Exceptions
-
◆ parse_stream()
| virtual void xmlpp::DtdValidator::parse_stream |
( |
std::istream & | in | ) |
|
|
virtual |
Parse a DTD from a stream.
If the validator already contains a DTD, that DTD is deleted.
- Parameters
-
- Exceptions
-
◆ parse_subset()
| virtual void xmlpp::DtdValidator::parse_subset |
( |
const Glib::ustring & | external, |
|
|
const Glib::ustring & | system ) |
|
virtual |
Parse an external subset (DTD file).
If the validator already contains a DTD, that DTD is deleted.
- Parameters
-
| external | The external ID of the DTD. |
| system | The URL of the DTD. |
- Exceptions
-
◆ release_underlying()
| void xmlpp::DtdValidator::release_underlying |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ validate()
| bool xmlpp::DtdValidator::validate |
( |
const Document * | doc | ) |
|
Validate a document, using a previously parsed DTD.
The internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present.
- Parameters
-
| doc | Pointer to the document. |
- Returns
- Whether the document is valid.
- Exceptions
-
◆ dtd_
| Dtd* xmlpp::DtdValidator::dtd_ |
|
protected |