|
| Text () |
| Create an empty Text node handle, suitable only for holding references to other Text nodes. More...
|
|
| Text (const String &text) |
| Create a new Text node with the given text; the node is not yet owned by any XML document. More...
|
|
Text | clone () const |
| The clone() method makes a deep copy of this Text node and returns a new orphan Text node with the same contents; ordinary assignment and copy construction are shallow. More...
|
|
const String & | getText () const |
| Obtain a const reference to the String holding the value of this Text. More...
|
|
String & | updText () |
| Obtain a writable reference to the String holding the value of this Text node; this can be used to alter the value. More...
|
|
bool | operator== (const Node &other) const |
| Comparing Nodes for equality means asking if the two Node handles are referring to exactly the same object; two different nodes that happen to have the same properties will not test equal by this criteria. More...
|
|
bool | operator!= (const Node &other) const |
| Inequality test using same criteria as operator==(). More...
|
|
| Node () |
| Create an empty Node handle that can be used to hold a reference to any kind of Node. More...
|
|
| Node (const Node &src) |
| Copy constructor is shallow; that is, this handle will refer to the same node as the source. More...
|
|
Node & | operator= (const Node &src) |
| Copy assignment is shallow; the handle is first cleared and then will refer to the same node as the source. More...
|
|
Node | clone () const |
| The clone() method makes a deep copy of this Node and its children and returns a new orphan Node with the same contents; ordinary assignment and copy construction is shallow. More...
|
|
| ~Node () |
| The Node handle destructor does not recover heap space so if you create orphan nodes and then don't put them in a document there will be a memory leak unless you explicitly destruct them first with clearOrphan(). More...
|
|
void | clear () |
| This method restores the Node handle to its default-constructed state but does not recover any heap space; use clearOrphan() if you know this node was never put into a document. More...
|
|
void | clearOrphan () |
| This method explictly frees the heap space for an orphan node that was created but never inserted into a document. More...
|
|
NodeType | getNodeType () const |
| Get the Xml::NodeType of this node. More...
|
|
String | getNodeTypeAsString () const |
| Get the Node type as a string; an empty handle returns "NoNode". More...
|
|
bool | isValid () const |
| Return true if this Node handle is referencing some node, false if the Node handle is empty. More...
|
|
bool | isTopLevelNode () const |
| Return true if this Node is owned by the top-level Xml document, false if the Node is owned by an Element or is an orphan, or if the Node handle is empty. More...
|
|
bool | isOrphan () const |
| Return true if this Node is an orphan, meaning that it is not empty, but is not owned by any element or top-level document. More...
|
|
bool | hasParentElement () const |
| Return true if this node has a parent, i.e. More...
|
|
Element | getParentElement () |
| Return a handle referencing this node's parent if it has one, otherwise throws an error; check first with hasParentElement() if you aren't sure. More...
|
|
const String & | getNodeText () const |
| Return a text value associated with this Node (not including its child nodes if any); the behavior depends on the NodeType. More...
|
|
void | writeToString (String &out, bool compact=false) const |
| Serialize this node (and everything it contains) to the given String. More...
|
|
This is the "leaf" content of an element.