rapidxml::xml_attribute< Ch > Class Template Reference
#include <rapidxml.hpp>
Inheritance diagram for rapidxml::xml_attribute< Ch >:
Collaboration diagram for rapidxml::xml_attribute< Ch >:
Public Member Functions | |
xml_attribute () | |
xml_document< Ch > * | document () const |
xml_attribute< Ch > * | previous_attribute (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
xml_attribute< Ch > * | next_attribute (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const |
Public Member Functions inherited from rapidxml::xml_base< Ch > | |
Ch * | name () const |
std::size_t | name_size () const |
Ch * | value () const |
std::size_t | value_size () const |
void | name (const Ch *name, std::size_t size) |
void | name (const Ch *name) |
void | value (const Ch *value, std::size_t size) |
void | value (const Ch *value) |
xml_node< Ch > * | parent () const |
Friends | |
class | xml_node< Ch > |
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 |
Ch * | m_value |
std::size_t | m_name_size |
std::size_t | m_value_size |
xml_node< Ch > * | m_parent |
Detailed Description
template<class Ch = char>
class rapidxml::xml_attribute< Ch >
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.
- Parameters
-
Ch Character type to use.
Constructor & Destructor Documentation
template<class Ch = char>
|
inline |
Constructs an empty attribute with the specified type. Consider using memory_pool of appropriate xml_document if allocating attributes manually.
Member Function Documentation
template<class Ch = char>
|
inline |
Gets document of which attribute is a child.
- Returns
- Pointer to document that contains this attribute, or 0 if there is no parent document.
template<class Ch = char>
|
inline |
Gets next attribute, optionally matching attribute name.
- Parameters
-
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
- Returns
- Pointer to found attribute, or 0 if not found.
template<class Ch = char>
|
inline |
Gets previous attribute, optionally matching attribute name.
- Parameters
-
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
- Returns
- Pointer to found attribute, or 0 if not found.
The documentation for this class was generated from the following file:
- src/forsyde/rapidxml.hpp
Generated by Doxygen 1.8.11