#include <rapidxml.hpp>
Public Member Functions | |
void | append_attribute (xml_attribute< Ch > *attribute) |
void | append_node (xml_node< Ch > *child) |
xml_document< Ch > * | document () const |
xml_attribute< Ch > * | first_attribute (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
xml_node< Ch > * | first_node (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
void | insert_attribute (xml_attribute< Ch > *where, xml_attribute< Ch > *attribute) |
void | insert_node (xml_node< Ch > *where, xml_node< Ch > *child) |
xml_attribute< Ch > * | last_attribute (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
xml_node< Ch > * | last_node (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
xml_node< Ch > * | next_sibling (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
void | prepend_attribute (xml_attribute< Ch > *attribute) |
void | prepend_node (xml_node< Ch > *child) |
xml_node< Ch > * | previous_sibling (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
void | remove_all_attributes () |
Removes all attributes of node. More... | |
void | remove_all_nodes () |
Removes all child nodes (but not attributes). More... | |
void | remove_attribute (xml_attribute< Ch > *where) |
void | remove_first_attribute () |
void | remove_first_node () |
void | remove_last_attribute () |
void | remove_last_node () |
void | remove_node (xml_node< Ch > *where) |
Removes specified child from the node. More... | |
node_type | type () const |
void | type (node_type type) |
xml_node (node_type type) | |
Public Member Functions inherited from rapidxml::xml_base< Ch > | |
Ch * | name () const |
void | name (const Ch *name, std::size_t size) |
void | name (const Ch *name) |
std::size_t | name_size () const |
xml_node< Ch > * | parent () const |
Ch * | value () const |
void | value (const Ch *value, std::size_t size) |
void | value (const Ch *value) |
std::size_t | value_size () const |
xml_base () | |
Private Member Functions | |
void | operator= (const xml_node &) |
xml_node (const xml_node &) | |
Private Attributes | |
xml_attribute< Ch > * | m_first_attribute |
xml_node< Ch > * | m_first_node |
xml_attribute< Ch > * | m_last_attribute |
xml_node< Ch > * | m_last_node |
xml_node< Ch > * | m_next_sibling |
xml_node< Ch > * | m_prev_sibling |
node_type | m_type |
Additional Inherited Members | |
Static Protected Member Functions inherited from rapidxml::xml_base< Ch > | |
static Ch * | nullstr () |
Protected Attributes inherited from rapidxml::xml_base< Ch > | |
Ch * | m_name |
std::size_t | m_name_size |
xml_node< Ch > * | m_parent |
Ch * | m_value |
std::size_t | m_value_size |
Class representing a node of XML document. Each node may have associated name and value strings, which are available through name() and value() functions. Interpretation of name and value depends on type of the node. Type of node can be determined by using type() function.
Note that after parse, both name and value of node, if any, will point interior of source text used for parsing. Thus, this text must persist in the memory for the lifetime of node.
Ch | Character type to use. |
Definition at line 133 of file rapidxml.hpp.
|
inline |
Constructs an empty node with the specified type. Consider using memory_pool of appropriate document to allocate nodes manually.
type | Type of node to construct. |
Definition at line 864 of file rapidxml.hpp.
|
private |
|
inline |
Appends a new attribute to the node.
attribute | Attribute to append. |
Definition at line 1164 of file rapidxml.hpp.
|
inline |
Appends a new child node. The appended child becomes the last child.
child | Node to append. |
Definition at line 1061 of file rapidxml.hpp.
|
inline |
Gets document of which node is a child.
Definition at line 880 of file rapidxml.hpp.
|
inline |
Gets first attribute of node, optionally matching attribute name.
name | Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero |
name_size | Size of name, in characters, or 0 to have size calculated automatically from string |
case_sensitive | Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
Definition at line 993 of file rapidxml.hpp.
|
inline |
Gets first child node, optionally matching node name.
name | Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero |
name_size | Size of name, in characters, or 0 to have size calculated automatically from string |
case_sensitive | Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
Definition at line 895 of file rapidxml.hpp.
|
inline |
Inserts a new attribute at specified place inside the node. All attributes after and including the specified attribute are moved one position back.
where | Place where to insert the attribute, or 0 to insert at the back. |
attribute | Attribute to insert. |
Definition at line 1182 of file rapidxml.hpp.
|
inline |
Inserts a new child node at specified place inside the node. All children after and including the specified node are moved one position back.
where | Place where to insert the child, or 0 to insert at the back. |
child | Node to insert. |
Definition at line 1079 of file rapidxml.hpp.
|
inline |
Gets last attribute of node, optionally matching attribute name.
name | Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero |
name_size | Size of name, in characters, or 0 to have size calculated automatically from string |
case_sensitive | Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
Definition at line 1016 of file rapidxml.hpp.
|
inline |
Gets last child node, optionally matching node name. Behaviour is undefined if node has no children. Use first_node() to test if node has children.
name | Name of child to find, or 0 to return last child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero |
name_size | Size of name, in characters, or 0 to have size calculated automatically from string |
case_sensitive | Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
Definition at line 919 of file rapidxml.hpp.
|
inline |
Gets next sibling node, optionally matching node name. Behaviour is undefined if node has no parent. Use parent() to test if node has a parent.
name | Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero |
name_size | Size of name, in characters, or 0 to have size calculated automatically from string |
case_sensitive | Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
Definition at line 970 of file rapidxml.hpp.
|
private |
|
inline |
Prepends a new attribute to the node.
attribute | Attribute to prepend. |
Definition at line 1148 of file rapidxml.hpp.
|
inline |
Prepends a new child node. The prepended child becomes the first child, and all existing children are moved one position back.
child | Node to prepend. |
Definition at line 1044 of file rapidxml.hpp.
|
inline |
Gets previous sibling node, optionally matching node name. Behaviour is undefined if node has no parent. Use parent() to test if node has a parent.
name | Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero |
name_size | Size of name, in characters, or 0 to have size calculated automatically from string |
case_sensitive | Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
Definition at line 945 of file rapidxml.hpp.
|
inline |
Removes all attributes of node.
Definition at line 1243 of file rapidxml.hpp.
|
inline |
Removes all child nodes (but not attributes).
Definition at line 1140 of file rapidxml.hpp.
|
inline |
Removes specified attribute from node.
where | Pointer to attribute to be removed. |
Definition at line 1229 of file rapidxml.hpp.
|
inline |
Removes first attribute of the node. If node has no attributes, behaviour is undefined. Use first_attribute() to test if node has attributes.
Definition at line 1202 of file rapidxml.hpp.
|
inline |
Removes first child node. If node has no children, behaviour is undefined. Use first_node() to test if node has children.
Definition at line 1098 of file rapidxml.hpp.
|
inline |
Removes last attribute of the node. If node has no attributes, behaviour is undefined. Use first_attribute() to test if node has attributes.
Definition at line 1216 of file rapidxml.hpp.
|
inline |
Removes last child of the node. If node has no children, behaviour is undefined. Use first_node() to test if node has children.
Definition at line 1112 of file rapidxml.hpp.
|
inline |
Removes specified child from the node.
Definition at line 1125 of file rapidxml.hpp.
|
inline |
|
inline |
Sets type of node.
type | Type of node to set. |
Definition at line 1036 of file rapidxml.hpp.
|
private |
Definition at line 1278 of file rapidxml.hpp.
|
private |
Definition at line 1275 of file rapidxml.hpp.
|
private |
Definition at line 1280 of file rapidxml.hpp.
|
private |
Definition at line 1276 of file rapidxml.hpp.
|
private |
Definition at line 1287 of file rapidxml.hpp.
|
private |
Definition at line 1284 of file rapidxml.hpp.
|
private |
Definition at line 1273 of file rapidxml.hpp.