#include <xmlnode.h>
Inheritance diagram for GNUMessenger::XMLNode:


Public Member Functions | |
| XMLNode () | |
| Default constructor, allocates XMLNodeData. | |
| XMLNode (const XMLNode &other) | |
| Constructs the object as a counted reference of the given object. | |
| XMLNode (const Contact &other) | |
| Creates an XMLNode from a Contact object. | |
| virtual const string & | name () const |
| a virtual function to return a 'name' | |
| virtual const string | type () const |
| const string & | data () const |
| map< string, string > & | properties () |
| Return all properties. | |
| const map< string, string > & | const_properties () const |
| Return all properties (read only). | |
| const string | property (const string &name) const |
| Return a single property. | |
| int | intProperty (const string &name) const |
| Return property as an integer if possible, otherwise 0. | |
| bool | hasChild (const string &name, int n=1) const |
| True if the node has a child with the specified name. | |
| unsigned int | numChildren (const string &name) const |
| Return how many children of a specified name there is in the node. | |
| vector< XMLNode > & | children () |
| Return all children. | |
| vector< XMLNode > & | const_children () const |
| Return all children (read only). | |
| XMLNode & | child (const string &name, int n=1) |
| Return a single child. | |
| XMLNode | child (const string &name, int n=1) const |
| Returns a child XMLNode. | |
| XMLNode & | setName (const string &name) |
| Set tag name. | |
| XMLNode & | setData (const string &data) |
| Set data. | |
| XMLNode & | setCData (const string &data) |
| Set data as cdata sections. | |
| XMLNode & | setProperty (const string &name, const string &value) |
| Set a property. | |
| XMLNode & | setProperty (const string &name, int value) |
| Set a property integer type. | |
| XMLNode & | addChild (XMLNode &node) |
| Add a child node to the tree. | |
| XMLNode & | addChild (const string &name, const string &data="") |
| Add a child node to the tree. | |
| XMLNode & | delChild (const string &name, int n=1) |
| Delete a child node, throws InvalidNode. | |
| XMLNode & | moveChild (unsigned int index, unsigned int newIndex) |
| moves the child at position index to in front of position newIndex | |
| XMLNode & | operator<< (const string &str) throw (ParseFailure) |
| Parse a string into a XMLNode directly. | |
| XMLNode & | operator= (const XMLNode &other) |
| Assignment operator. | |
| operator string () const | |
| Implicitly convert to string. | |
| string & | operator[] (const string &name) |
| Set and get tag properties using operator[]. | |
| string | operator[] (const string &name) const |
| Returns tag properties using overloaded operator []. | |
Protected Attributes | |
| XMLNodeData * | m_xmlData |
Static Protected Attributes | |
| bool | m_isValid |
Friends | |
| ostream & | operator<< (ostream &o, XMLNode &n) |
| Outputs the XMLNode to an std output stream. | |
This is a parsed xml tag. It stores all properties and all nested nodes and the text between the start tag. It can be used as a combined tree, array and associative map data structure without any artificial size limits.
Terminology:
<tag property1="value" property2="a value"> .. some text here .. </tag>
Definition at line 67 of file xmlnode.h.
|
|
Constructs the object as a counted reference of the given object.
References m_xmlData, and GNUMessenger::XMLNode::XMLNodeData::ref().
Here is the call graph for this function: ![]() |
|
|
Creates an XMLNode from a Contact object.
References m_xmlData, and GNUMessenger::XMLNode::XMLNodeData::ref().
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Returns a child XMLNode.
References GNUMessenger::XMLNode::XMLNodeData::m_children, and XMLNode().
Here is the call graph for this function: ![]() |
|
||||||||||||
|
||||||||||||
|
Delete a child node, throws InvalidNode.
References GNUMessenger::XMLNode::XMLNodeData::m_children. Referenced by GNUMessenger::ContactManager::deleteAllInfo(), GNUMessenger::ContactManager::deleteAllNets(), GNUMessenger::ContactManager::deleteContact(), GNUMessenger::ContactManager::deleteFolder(), GNUMessenger::ContactManager::deleteInfo(), and GNUMessenger::ContactManager::moveContact().
|
|
||||||||||||
|
True if the node has a child with the specified name.
References GNUMessenger::XMLNode::XMLNodeData::m_children. Referenced by GNUMessenger::Contact::addProtocol(), GNUMessenger::Contact::getOverallStatus(), GNUMessenger::Contact::getProtocol(), GNUMessenger::Contact::getServerId(), GNUMessenger::Contact::getStatus(), GNUMessenger::Contact::hasProtocol(), GNUMessenger::Contact::setServerId(), and GNUMessenger::Contact::setStatus().
|
|
|
Parse a string into a XMLNode directly.
References GNUMessenger::XMLParser::get_root().
Here is the call graph for this function: ![]() |
|
|
Assignment operator.
References GNUMessenger::XMLNode::XMLNodeData::deref(), m_xmlData, and GNUMessenger::XMLNode::XMLNodeData::ref().
Here is the call graph for this function: ![]() |
|
|
Returns tag properties using overloaded operator [].
References GNUMessenger::XMLNode::XMLNodeData::m_properties.
|
|
||||||||||||
|
Outputs the XMLNode to an std output stream.
|
1.3.8