#include <xmlNode.h>
Public Member Functions | |
XmlNode () | |
Create an incomplete node. | |
XmlNode (const NodeType type, const string &name) | |
Constructor. | |
virtual | ~XmlNode () |
Destructor. | |
void | freeSubTree () |
void | readFromStream (istream &readFrom, const bool readChildren=true) |
Read the configuration of the node from a stream. | |
void | writeToStream (ostream &writeTo, const bool pretty=true) |
Write the node and all child nodes to a stream. | |
NodeSearch * | findInit (const string &name, const bool ignoreNamespaces=false) |
Create a new search handle. | |
XmlNode * | findNext (NodeSearch *ns) |
Return the next occurrence of the node name to find, NULL if nothing is found. | |
void | findFree (NodeSearch *ns) |
Free a NodeSearch handle. | |
XmlNode * | findFirst (const string &name, const bool ignoreNamespaces=false) |
Find the first occurrence of a node given by name. | |
Public Attributes | |
NodeType | type |
node type | |
string | name |
name of node (or content if it is a ntTextNode) | |
bool | complete |
whether the subtree is read/written completely | |
NodeAttributes | attributes |
key, value | |
NodeChildren | children |
Definition at line 81 of file xmlNode.h.
|
Constructor. Create a completed node.
Definition at line 54 of file xmlNode.cpp. References complete. |
|
Destructor. All child nodes are freed, too (in a recursive manner). Definition at line 64 of file xmlNode.cpp. References freeSubTree(). |
|
Find the first occurrence of a node given by name.
Definition at line 801 of file xmlNode.cpp. References findFree(), findInit(), and findNext(). |
|
Free a NodeSearch handle.
Definition at line 785 of file xmlNode.cpp. References sxml::NodeSearch::owner. Referenced by findFirst(). |
|
Create a new search handle. This handle can be used to iterate nodes with the same name.
Definition at line 699 of file xmlNode.cpp. References sxml::NodeSearch::childIndices, sxml::NodeSearch::ignoreNamespaces, sxml::NodeSearch::name, sxml::NodeSearch::owner, and sxml::NodeSearch::parents. Referenced by findFirst(). |
|
Return the next occurrence of the node name to find, NULL if nothing is found.
Definition at line 721 of file xmlNode.cpp. References sxml::NodeSearch::childIndices, sxml::NodeSearch::ignoreNamespaces, sxml::NodeSearch::name, sxml::NodeSearch::owner, and sxml::NodeSearch::parents. Referenced by findFirst(). |
|
Read the configuration of the node from a stream. The stream should be positioned to a valid start tag of an XML element (e.g. the beginning of a file or any intermediate XML element) - if not, it will return a text element.
Definition at line 85 of file xmlNode.cpp. References attributes, complete, sxml::eBadStream, sxml::eUnexpectedCloseTag, sxml::eUtf8BomError, sxml::eXmlParseError, name, sxml::ntDocTypeNode, sxml::ntDocumentNode, sxml::ntElementNode, type, and XmlNode(). |
|
Write the node and all child nodes to a stream. The format resembles to XML.
Definition at line 542 of file xmlNode.cpp. References complete, sxml::eBadStream, and sxml::eNodeIncomplete. |