#include <rapidxml.hpp>
Classes | |
struct | attribute_name_pred |
struct | attribute_value_pred |
struct | attribute_value_pure_pred |
struct | node_name_pred |
struct | text_pred |
struct | text_pure_no_ws_pred |
struct | text_pure_with_ws_pred |
struct | whitespace_pred |
Public Member Functions | |
void | clear () |
template<int Flags> | |
void | parse (Ch *text) |
xml_document () | |
Constructs empty XML document. More... | |
Private Member Functions | |
template<int Flags> | |
Ch | parse_and_append_data (xml_node< Ch > *node, Ch *&text, Ch *contents_start) |
template<int Flags> | |
void | parse_bom (Ch *&text) |
template<int Flags> | |
xml_node< Ch > * | parse_cdata (Ch *&text) |
template<int Flags> | |
xml_node< Ch > * | parse_comment (Ch *&text) |
template<int Flags> | |
xml_node< Ch > * | parse_doctype (Ch *&text) |
template<int Flags> | |
xml_node< Ch > * | parse_element (Ch *&text) |
template<int Flags> | |
xml_node< Ch > * | parse_node (Ch *&text) |
template<int Flags> | |
void | parse_node_attributes (Ch *&text, xml_node< Ch > *node) |
template<int Flags> | |
void | parse_node_contents (Ch *&text, xml_node< Ch > *node) |
template<int Flags> | |
xml_node< Ch > * | parse_pi (Ch *&text) |
template<int Flags> | |
xml_node< Ch > * | parse_xml_declaration (Ch *&text) |
Static Private Member Functions | |
template<int Flags> | |
static void | insert_coded_character (Ch *&text, unsigned long code) |
template<class StopPred , int Flags> | |
static void | skip (Ch *&text) |
template<class StopPred , class StopPredPure , int Flags> | |
static Ch * | skip_and_expand_character_refs (Ch *&text) |
This class represents root of the DOM hierarchy. It is also an xml_node and a memory_pool through public inheritance. Use parse() function to build a DOM tree from a zero-terminated XML text string. parse() function allocates memory for nodes and attributes by using functions of xml_document, which are inherited from memory_pool. To access root node of the document, use the document itself, as if it was an xml_node.
Ch | Character type to use. |
Definition at line 139 of file rapidxml.hpp.
|
inline |
Constructs empty XML document.
Definition at line 1364 of file rapidxml.hpp.
|
inline |
Clears the document by deleting all nodes and clearing the memory pool. All nodes owned by document pool are destroyed.
Definition at line 1415 of file rapidxml.hpp.
|
inlinestaticprivate |
Definition at line 1511 of file rapidxml.hpp.
|
inline |
Parses zero-terminated XML string according to given flags. Passed string will be modified by the parser, unless rapidxml::parse_non_destructive flag is used. The string must persist for the lifetime of the document. In case of error, rapidxml::parse_error exception will be thrown.
If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning. Make sure that data is zero-terminated.
Document can be parsed into multiple times. Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool.
text | XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser. |
Definition at line 1381 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1940 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1725 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1998 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1773 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1814 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 2037 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 2081 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 2237 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 2167 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1880 of file rapidxml.hpp.
|
inlineprivate |
Definition at line 1738 of file rapidxml.hpp.
|
inlinestaticprivate |
Definition at line 1558 of file rapidxml.hpp.
|
inlinestaticprivate |
Definition at line 1570 of file rapidxml.hpp.