|
| DomParser () |
| Create a parser with an empty document.
|
|
| DomParser (const std::string & filename, bool validate=false) |
| Instantiate the parser and parse a document immediately.
|
|
| ~DomParser () override |
|
const Document * | get_document () const noexcept |
| Get the parsed document.
|
|
Document * | get_document () noexcept |
| Get the parsed document.
|
|
void | get_xinclude_options (bool & process_xinclude, bool & generate_xinclude_nodes, bool & fixup_base_uris) const noexcept |
| Get whether and how the parser will perform XInclude substitution.
|
|
| operator bool () const noexcept |
| Test whether a document has been parsed.
|
|
void | parse_file (const std::string & filename) override |
| Parse an XML document from a file.
|
|
void | parse_memory (const ustring & contents) override |
| Parse an XML document from a string.
|
|
void | parse_memory_raw (const unsigned char * contents, size_type bytes_count) override |
| Parse an XML document from raw memory.
|
|
void | parse_stream (std::istream & in) override |
| Parse an XML document from a stream.
|
|
void | set_xinclude_options (bool process_xinclude=true, bool generate_xinclude_nodes=true, bool fixup_base_uris=true) noexcept |
| Set whether and how the parser will perform XInclude substitution.
|
|
| Parser () |
|
| ~Parser () override |
|
bool | get_include_default_attributes () const noexcept |
| See set_include_default_attributes().
|
|
void | get_parser_options (int & set_options, int & clear_options) const noexcept |
| See set_parser_options().
|
|
bool | get_substitute_entities () const noexcept |
| See set_substitute_entities().
|
|
bool | get_throw_messages () const noexcept |
| See set_throw_messages().
|
|
bool | get_validate () const noexcept |
| See set_validate().
|
|
virtual void | parse_file (const std::string & filename)=0 |
| Parse an XML document from a file.
|
|
virtual void | parse_memory (const ustring & contents)=0 |
| Parse an XML document from a string.
|
|
virtual void | parse_memory_raw (const unsigned char * contents, size_type bytes_count)=0 |
| Parse an XML document from raw memory.
|
|
virtual void | parse_stream (std::istream & in)=0 |
| Parse an XML document from a stream.
|
|
void | set_include_default_attributes (bool val=true) noexcept |
| Set whether default attribute values from the DTD shall be included in the node tree.
|
|
void | set_parser_options (int set_options=0, int clear_options=0) noexcept |
| Set and/or clear parser option flags.
|
|
void | set_substitute_entities (bool val=true) noexcept |
| Set whether the parser will automatically substitute entity references with the text of the entities' definitions.
|
|
void | set_throw_messages (bool val=true) noexcept |
| Set whether the parser will collect and throw error and warning messages.
|
|
void | set_validate (bool val=true) noexcept |
| By default, the parser will not validate the XML file.
|
|
| NonCopyable (const NonCopyable &)=delete |
|
| NonCopyable (NonCopyable &&)=delete |
|
NonCopyable & | operator= (const NonCopyable &)=delete |
|
NonCopyable & | operator= (NonCopyable &&)=delete |
|
|
using | size_type = unsigned int |
|
enum class | MsgType {
ParserError
,
ParserWarning
,
ValidityError
,
ValidityWarning
} |
|
static void | callback_error_or_warning (bool is_parser, bool is_error, void * ctx, const char * msg, va_list var_args) |
|
static void | callback_error_or_warning (MsgType msg_type, void * ctx, const char * msg, va_list var_args) |
|
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 ParserCallbackCFuncType | get_callback_parser_error_cfunc () |
|
static ParserCallbackCFuncType | get_callback_parser_warning_cfunc () |
|
static ParserCallbackCFuncType | get_callback_validity_error_cfunc () |
|
static ParserCallbackCFuncType | get_callback_validity_warning_cfunc () |
|
DOM XML parser.
DOM = Document Object Model