![]() |
libhomegear-base
0.7
Base library for Homegear and Homegear family modules.
|
Class representing attribute node of XML document. More...
#include <rapidxml.h>
Public Member Functions | |
xml_attribute ()=default | |
Constructs an empty attribute with the specified type. More... | |
xml_document * | document () const |
Gets document of which attribute is a child. More... | |
xml_attribute * | previous_attribute (const char *name=nullptr, std::size_t name_size=0, bool case_sensitive=true) const |
Gets previous attribute, optionally matching attribute name. More... | |
xml_attribute * | next_attribute (const char *name=nullptr, std::size_t name_size=0, bool case_sensitive=true) const |
Gets next attribute, optionally matching attribute name. More... | |
![]() | |
xml_base () | |
char * | name () const |
Gets name of the node. More... | |
std::size_t | name_size () const |
Gets size of node name, not including terminator character. More... | |
char * | value () const |
Gets value of node. More... | |
std::size_t | value_size () const |
Gets size of node value, not including terminator character. More... | |
void | name (const char *name, std::size_t size) |
Sets name of node to a non zero-terminated string. More... | |
void | name (const char *name) |
Sets name of node to a zero-terminated string. More... | |
void | value (const char *value, std::size_t size) |
Sets value of node to a non zero-terminated string. More... | |
void | value (const char *value) |
Sets value of node to a zero-terminated string. More... | |
xml_node * | parent () const |
Gets node parent. More... | |
Friends | |
class | xml_node |
Additional Inherited Members | |
![]() | |
static char * | nullstr () |
![]() | |
char * | m_name |
char * | m_value |
std::size_t | m_name_size |
std::size_t | m_value_size |
xml_node * | m_parent |
Class representing attribute node of XML document.
Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base). Note that after parse, both name and value of attribute will point to interior of source text used for parsing. Thus, this text must persist in memory for the lifetime of attribute.
Ch | Character type to use. |
|
default |
Constructs an empty attribute with the specified type.
Consider using memory_pool of appropriate xml_document if allocating attributes manually.
xml_document * rapidxml::xml_attribute::document | ( | ) | const |
Gets document of which attribute is a child.
xml_attribute * rapidxml::xml_attribute::next_attribute | ( | const char * | name = nullptr , |
std::size_t | name_size = 0 , |
||
bool | case_sensitive = true |
||
) | const |
Gets next attribute, optionally matching attribute name.
name | Name of attribute to find, or 0 to return next 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 |
xml_attribute * rapidxml::xml_attribute::previous_attribute | ( | const char * | name = nullptr , |
std::size_t | name_size = 0 , |
||
bool | case_sensitive = true |
||
) | const |
Gets previous attribute, optionally matching attribute name.
name | Name of attribute to find, or 0 to return previous 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 |
|
friend |