Public Types | |
enum | CopyMode { RECURSIVE, NONRECURSIVE } |
Enumerates copy modes for xml nodes. More... | |
Public Member Functions | |
NXmlNode (void) | |
Constructs a NXmlNode object. | |
NXmlNode (const NString &name) | |
Constructs a NXmlNode object. | |
NXmlNode (const NString &name, const NString &data) | |
Constructs a NXmlNode object. | |
NXmlNode (const NXmlNode &other) | |
Constructs a NXmlNode object. | |
~NXmlNode (void) | |
Destroys a NXmlNode object. | |
void | setName (const NString &name) |
Sets the name of the node. | |
NString | getName (void) const |
Gets the name of the node. | |
void | setData (const NString &data) |
Sets the data of the node. | |
NString | getData (void) const |
Gets the data of the node. | |
bool | isBlank (void) const |
Returns whether the node is blank or not. | |
bool | isText (void) const |
Returns whether the node holds text data. | |
bool | isNull (void) const |
Returns whether the node is null or not. | |
NXmlNode | addChild (const NString &name) |
Adds a child node. | |
NXmlNode | addChild (const NString &name, const NString &data) |
Adds a child node. | |
NXmlNode | addNextSibling (const NString &name) |
Adds a sibling node. | |
NXmlNode | addNextSibling (const NString &name, const NString &data) |
Adds a sibling node. | |
NXmlNode | addPreviousSibling (const NString &name) |
Adds a sibling node. | |
NXmlNode | addPreviousSibling (const NString &name, const NString &data) |
Adds a sibling node. | |
NXmlNode | getChild (void) |
Gets the first child node. | |
NXmlNode | getLast (void) |
Gets the last node. | |
NXmlNode | getParent (void) |
Gets the parent node. | |
NXmlNode | getNext (void) |
Gets the next sibling node. | |
NXmlNode | getPrevious (void) |
Gets the previous sibling node. | |
bool | hasChild (void) const |
Returns whether the node has a child or not. | |
bool | hasLast (void) const |
Returns whether the node has a last node or not. | |
bool | hasParent (void) const |
Returns whether the node has a parent node or not. | |
bool | hasNext (void) const |
Returns whether the node has a next node or not. | |
bool | hasPrevious (void) const |
Returns whether the node has a previous node or not. | |
const NXmlNode | getChild (void) const |
Gets the first child node. | |
const NXmlNode | getLast (void) const |
Gets the last node. | |
const NXmlNode | getParent (void) const |
Gets the parent node. | |
const NXmlNode | getNext (void) const |
Gets the next sibling node. | |
const NXmlNode | getPrevious (void) const |
Gets the previous sibling node. | |
NXmlNode & | addProperty (const NString &name, const NString &data) |
Adds a property to the current object. | |
bool | removeProperty (const NString &name) |
Removes a property of the current node. | |
NString | getProperty (const NString &name) const |
Gets a property of the current object. | |
bool | hasProperty (const NString &name) const |
Returns whether the current object has a property. | |
bool | removeChild (void) |
Removes a child node. | |
bool | removeChild (const NString &name) |
Removes a child node. | |
bool | removeNextSibling (void) |
Removes a sibling node. | |
bool | removeNextSibling (const NString &name) |
Removes a sibling node. | |
bool | removePreviousSibling (void) |
Removes a sibling node. | |
bool | removePreviousSibling (const NString &name) |
Removes a sibling node. | |
NXmlNode | find (const NString &name) |
Finds a node. | |
const NXmlNode | find (const NString &name) const |
Finds a node. | |
NXmlNode | copy (const NXmlNode &other) const |
Recursively copy a node. | |
NXmlNode & | operator= (const NXmlNode &rhs) |
Copy a node. | |
Friends | |
class | NXmlDocument |
class | NXmlReader |
class | NXmlWriter |
Definition at line 48 of file nxmlnode.h.
enum CopyMode |
Constructs a NXmlNode object.
name | The name of the node |
Definition at line 35 of file nxmlnode.cpp.
Constructs a NXmlNode object.
name | The name of the node | |
data | The data of the node |
Definition at line 43 of file nxmlnode.cpp.
Constructs a NXmlNode object.
other | A NXmlNode object which will be copied |
Definition at line 50 of file nxmlnode.cpp.
References getNode().
void setName | ( | const NString & | name | ) |
Sets the name of the node.
name | The name of the node |
Definition at line 82 of file nxmlnode.cpp.
References NString::toChar().
NString getName | ( | void | ) | const |
Gets the name of the node.
Definition at line 91 of file nxmlnode.cpp.
void setData | ( | const NString & | data | ) |
Sets the data of the node.
data | The data of the node |
Definition at line 102 of file nxmlnode.cpp.
References NString::toChar().
NString getData | ( | void | ) | const |
Gets the data of the node.
Definition at line 109 of file nxmlnode.cpp.
References isBlank().
bool isBlank | ( | void | ) | const |
Returns whether the node is blank or not.
Definition at line 128 of file nxmlnode.cpp.
Referenced by getData().
bool isText | ( | void | ) | const |
Returns whether the node holds text data.
Definition at line 137 of file nxmlnode.cpp.
bool isNull | ( | void | ) | const |
Returns whether the node is null or not.
Definition at line 146 of file nxmlnode.cpp.
Adds a child node.
name | The name of the child node |
Definition at line 182 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NXmlNode().
Adds a child node.
name | The name of the child node | |
data | The data of the child node |
Definition at line 199 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NXmlNode().
Adds a sibling node.
name | The name of the node |
Definition at line 216 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NXmlNode().
Adds a sibling node.
name | The name of the sibling node | |
data | The data of the sibling node |
Definition at line 233 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NXmlNode().
Adds a sibling node.
name | The name of the sibling node |
Definition at line 250 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NXmlNode().
Adds a sibling node.
name | The name of the sibling node | |
data | The data of the sibling node |
Definition at line 267 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NXmlNode().
NXmlNode getChild | ( | void | ) |
Gets the first child node.
Definition at line 304 of file nxmlnode.cpp.
References NXmlNode().
NXmlNode getLast | ( | void | ) |
Gets the last node.
Definition at line 309 of file nxmlnode.cpp.
References NXmlNode().
NXmlNode getParent | ( | void | ) |
Gets the parent node.
Definition at line 313 of file nxmlnode.cpp.
References NXmlNode().
NXmlNode getNext | ( | void | ) |
Gets the next sibling node.
Definition at line 318 of file nxmlnode.cpp.
References NXmlNode().
NXmlNode getPrevious | ( | void | ) |
Gets the previous sibling node.
Definition at line 323 of file nxmlnode.cpp.
References NXmlNode().
bool hasChild | ( | void | ) | const |
Returns whether the node has a child or not.
Definition at line 284 of file nxmlnode.cpp.
bool hasLast | ( | void | ) | const |
Returns whether the node has a last node or not.
Definition at line 288 of file nxmlnode.cpp.
bool hasParent | ( | void | ) | const |
Returns whether the node has a parent node or not.
Definition at line 292 of file nxmlnode.cpp.
bool hasNext | ( | void | ) | const |
Returns whether the node has a next node or not.
Definition at line 296 of file nxmlnode.cpp.
bool hasPrevious | ( | void | ) | const |
Returns whether the node has a previous node or not.
Definition at line 300 of file nxmlnode.cpp.
const NXmlNode getChild | ( | void | ) | const |
Gets the first child node.
Definition at line 328 of file nxmlnode.cpp.
References NXmlNode().
const NXmlNode getLast | ( | void | ) | const |
Gets the last node.
Definition at line 333 of file nxmlnode.cpp.
References NXmlNode().
const NXmlNode getParent | ( | void | ) | const |
Gets the parent node.
Definition at line 338 of file nxmlnode.cpp.
References NXmlNode().
const NXmlNode getNext | ( | void | ) | const |
Gets the next sibling node.
Definition at line 343 of file nxmlnode.cpp.
References NXmlNode().
const NXmlNode getPrevious | ( | void | ) | const |
Gets the previous sibling node.
Definition at line 348 of file nxmlnode.cpp.
References NXmlNode().
Adds a property to the current object.
name | The name of the property | |
data | The data of the property |
Definition at line 353 of file nxmlnode.cpp.
References NXmlError::getLastError(), and NString::toChar().
bool removeProperty | ( | const NString & | name | ) |
Removes a property of the current node.
name | The name of the property to be removed |
Definition at line 371 of file nxmlnode.cpp.
Gets a property of the current object.
name | The name of the property |
Definition at line 395 of file nxmlnode.cpp.
References NString::toChar().
bool hasProperty | ( | const NString & | name | ) | const |
Returns whether the current object has a property.
name | The name of the property |
Definition at line 407 of file nxmlnode.cpp.
References NString::toChar().
bool removeChild | ( | void | ) |
Removes a child node.
Definition at line 418 of file nxmlnode.cpp.
bool removeChild | ( | const NString & | name | ) |
Removes a child node.
name | The name of the child node to be removed |
Definition at line 428 of file nxmlnode.cpp.
bool removeNextSibling | ( | void | ) |
Removes a sibling node.
Definition at line 453 of file nxmlnode.cpp.
bool removeNextSibling | ( | const NString & | name | ) |
Removes a sibling node.
name | The name of the sibling node to be removed |
Definition at line 463 of file nxmlnode.cpp.
bool removePreviousSibling | ( | void | ) |
Removes a sibling node.
Definition at line 488 of file nxmlnode.cpp.
bool removePreviousSibling | ( | const NString & | name | ) |
Removes a sibling node.
name | The name of the sibling node to be removed |
Definition at line 498 of file nxmlnode.cpp.
Finds a node.
name | The name of the node |
Definition at line 523 of file nxmlnode.cpp.
References NXmlNode().
Referenced by find().
Finds a node.
name | The name of the node |
Definition at line 545 of file nxmlnode.cpp.
References find().
Recursively copy a node.
other | The node to be copied |
Definition at line 549 of file nxmlnode.cpp.
References NXmlNode().
Copy a node.
rhs | The node to be copied |
Definition at line 561 of file nxmlnode.cpp.
References getNode().