XML parser. More...
#include <libxml++/parsers/parser.h>
Static Protected Member Functions |
static void | callback_parser_error (void* ctx, const char* msg,...) |
static void | callback_parser_warning (void* ctx, const char* msg,...) |
static void | callback_validity_error (void* ctx, const char* msg,...) |
static void | callback_validity_warning (void* ctx, const char* msg,...) |
static void | callback_error_or_warning (MsgType msg_type, void* ctx, const char* msg, va_list var_args) |
Additional Inherited Members |
Detailed Description
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
MsgParserError |
|
MsgParserWarning |
|
MsgValidityError |
|
MsgValidityWarning |
|
Constructor & Destructor Documentation
xmlpp::Parser::Parser |
( |
| ) |
|
virtual xmlpp::Parser::~Parser |
( |
| ) |
|
|
virtual |
Member Function Documentation
static void xmlpp::Parser::callback_error_or_warning |
( |
MsgType |
msg_type, |
|
|
void * |
ctx, |
|
|
const char * |
msg, |
|
|
va_list |
var_args |
|
) |
| |
|
staticprotected |
static void xmlpp::Parser::callback_parser_error |
( |
void * |
ctx, |
|
|
const char * |
msg, |
|
|
|
... |
|
) |
| |
|
staticprotected |
static void xmlpp::Parser::callback_parser_warning |
( |
void * |
ctx, |
|
|
const char * |
msg, |
|
|
|
... |
|
) |
| |
|
staticprotected |
static void xmlpp::Parser::callback_validity_error |
( |
void * |
ctx, |
|
|
const char * |
msg, |
|
|
|
... |
|
) |
| |
|
staticprotected |
static void xmlpp::Parser::callback_validity_warning |
( |
void * |
ctx, |
|
|
const char * |
msg, |
|
|
|
... |
|
) |
| |
|
staticprotected |
virtual void xmlpp::Parser::check_for_exception |
( |
| ) |
|
|
protectedvirtual |
virtual void xmlpp::Parser::check_for_validity_messages |
( |
| ) |
|
|
protectedvirtual |
virtual bool xmlpp::Parser::get_substitute_entities |
( |
| ) |
const |
|
virtual |
bool xmlpp::Parser::get_throw_messages |
( |
| ) |
const |
virtual bool xmlpp::Parser::get_validate |
( |
| ) |
const |
|
virtual |
See set_validate()
- Returns
- Whether the parser will validate the XML file.
virtual void xmlpp::Parser::handleException |
( |
const exception& |
e | ) |
|
|
protectedvirtual |
virtual void xmlpp::Parser::initialize_context |
( |
| ) |
|
|
protectedvirtual |
virtual void xmlpp::Parser::on_validity_error |
( |
const Glib::ustring & |
message | ) |
|
|
protectedvirtual |
virtual void xmlpp::Parser::on_validity_warning |
( |
const Glib::ustring & |
message | ) |
|
|
protectedvirtual |
virtual void xmlpp::Parser::parse_file |
( |
const Glib::ustring & |
filename | ) |
|
|
pure virtual |
virtual void xmlpp::Parser::parse_memory |
( |
const Glib::ustring & |
contents | ) |
|
|
pure virtual |
virtual void xmlpp::Parser::parse_stream |
( |
std::istream & |
in | ) |
|
|
pure virtual |
virtual void xmlpp::Parser::release_underlying |
( |
| ) |
|
|
protectedvirtual |
virtual void xmlpp::Parser::set_substitute_entities |
( |
bool |
val = true | ) |
|
|
virtual |
Set whether the parser will automatically substitute entity references with the text of the entities' definitions.
For instance, this affects the text returned by ContentNode::get_content(). By default, the parser will not substitute entities, so that you do not lose the entity reference information.
- Parameters
-
val | Whether entities will be substitued. |
void xmlpp::Parser::set_throw_messages |
( |
bool |
val = true | ) |
|
Set whether the parser will collect and throw error and warning messages.
If messages are collected, they are included in an exception thrown at the end of parsing. If the messages are not collected, they are written on stderr. The messages written on stderr are slightly different, and may be preferred in a program started from the command-line.
The default, if set_throw_messages() is not called, is to collect and throw only messages from validation. Other messages are written to stderr. This is for backward compatibility, and may change in the future.
- Since libxml++ 2.36:
- Parameters
-
val | Whether messages will be collected and thrown in an exception. |
virtual void xmlpp::Parser::set_validate |
( |
bool |
val = true | ) |
|
|
virtual |
By default, the parser will not validate the XML file.
- Parameters
-
val | Whether the document should be validated. |
Member Data Documentation
_xmlParserCtxt* xmlpp::Parser::context_ |
|
protected |
bool xmlpp::Parser::substitute_entities_ |
|
protected |
bool xmlpp::Parser::validate_ |
|
protected |
Glib::ustring xmlpp::Parser::validate_error_ |
|
protected |
Glib::ustring xmlpp::Parser::validate_warning_ |
|
protected |
The documentation for this class was generated from the following file: