Rudiments
Public Member Functions | Static Public Member Functions | List of all members
domnode Class Reference

Inherits object.

Public Member Functions

 domnode (dom *dom)
 
 domnode (dom *dom, domnodetype type, const char *name, const char *value)
 
 domnode (dom *dom, domnodetype type, const char *ns, const char *name, const char *value)
 
virtual ~domnode ()
 
virtual domnodetype getType ()
 
virtual const char * getNamespace ()
 
virtual const char * getName ()
 
virtual const char * getValue ()
 
domgetTree ()
 
virtual domnodegetParent ()
 
virtual uint64_t getPosition ()
 
virtual domnodegetPreviousSibling ()
 
domnodegetPreviousTagSibling ()
 
domnodegetPreviousTagSibling (const char *name)
 
domnodegetPreviousTagSibling (const char *ns, const char *name)
 
domnodegetPreviousTagSiblingIgnoringCase (const char *name)
 
domnodegetPreviousTagSiblingIgnoringCase (const char *ns, const char *name)
 
domnodegetPreviousTagSibling (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetPreviousTagSibling (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetPreviousTagSiblingIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetPreviousTagSiblingIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
virtual domnodegetNextSibling ()
 
domnodegetNextTagSibling ()
 
domnodegetNextTagSibling (const char *name)
 
domnodegetNextTagSibling (const char *ns, const char *name)
 
domnodegetNextTagSiblingIgnoringCase (const char *name)
 
domnodegetNextTagSiblingIgnoringCase (const char *ns, const char *name)
 
domnodegetNextTagSibling (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetNextTagSibling (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetNextTagSiblingIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetNextTagSiblingIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetNextTagSiblingInSet (const char *const *set)
 
domnodegetNextTagSiblingInSet (const char *ns, const char *const *set)
 
virtual uint64_t getChildCount ()
 
virtual domnodegetFirstChild ()
 
domnodegetFirstChild (const char *name)
 
domnodegetFirstChild (const char *ns, const char *name)
 
domnodegetFirstChildIgnoringCase (const char *name)
 
domnodegetFirstChildIgnoringCase (const char *ns, const char *name)
 
domnodegetChild (uint64_t position)
 
domnodegetFirstChild (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstChild (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstChildIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstChildIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagChild ()
 
domnodegetFirstTagChild (const char *name)
 
domnodegetFirstTagChild (const char *ns, const char *name)
 
domnodegetFirstTagChildIgnoringCase (const char *name)
 
domnodegetFirstTagChildIgnoringCase (const char *ns, const char *name)
 
domnodegetFirstTagChild (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagChild (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagChildIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagChildIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagChildInSet (const char *const *set)
 
domnodegetFirstTagChildInSet (const char *ns, const char *const *set)
 
domnodegetFirstTagDescendent (const char *name)
 
domnodegetFirstTagDescendent (const char *ns, const char *name)
 
domnodegetFirstTagDescendentIgnoringCase (const char *name)
 
domnodegetFirstTagDescendentIgnoringCase (const char *ns, const char *name)
 
domnodegetFirstTagDescendent (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagDescendent (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagDescendentIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagDescendentIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
domnodegetFirstTagDescendentInSet (const char *const *set)
 
domnodegetFirstTagDescendentInSet (const char *ns, const char *const *set)
 
domnodegetNextTag ()
 
domnodegetNextTag (domnode *top)
 
domnodegetPreviousTag ()
 
domnodegetPreviousTag (domnode *top)
 
virtual uint64_t getAttributeCount ()
 
virtual domnodegetAttribute (const char *name)
 
virtual domnodegetAttributeIgnoringCase (const char *name)
 
virtual domnodegetAttribute (uint64_t position)
 
const char * getAttributeValue (const char *name)
 
const char * getAttributeValue (uint64_t position)
 
dictionary< const char *, const char * > * getAttributes ()
 
void setAttributeValue (const char *name, const char *value)
 
void setAttributeValue (const char *name, int64_t value)
 
void setAttributeValue (const char *name, uint64_t value)
 
domnodegetNullNode ()
 
virtual bool isNullNode ()
 
virtual void setType (domnodetype type)
 
virtual void setNamespace (const char *ns)
 
virtual void setName (const char *name)
 
void setName (const char *ns, const char *name)
 
virtual void setValue (const char *value)
 
virtual void setParent (domnode *parent)
 
virtual void setPreviousSibling (domnode *previous)
 
virtual void setNextSibling (domnode *next)
 
bool insertChild (domnode *child, uint64_t position)
 
bool appendChild (domnode *child)
 
domnodeinsertTag (const char *tag, uint64_t position)
 
domnodeinsertTag (const char *ns, const char *tag, uint64_t position)
 
domnodeappendTag (const char *tag)
 
domnodeappendTag (const char *ns, const char *tag)
 
bool moveChild (domnode *child, domnode *parent, uint64_t position)
 
bool deleteChild (uint64_t position)
 
bool deleteChild (domnode *child)
 
bool deleteFirstChild (const char *name)
 
bool deleteFirstChild (const char *ns, const char *name)
 
bool deleteFirstChildIgnoringCase (const char *name)
 
bool deleteFirstChildIgnoringCase (const char *ns, const char *name)
 
bool deleteFirstChild (const char *name, const char *attributename, const char *attributevalue)
 
bool deleteFirstChild (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
bool deleteFirstChildIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
bool deleteFirstChildIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
bool deleteChildren ()
 
bool deleteChildren (const char *name)
 
bool deleteChildren (const char *ns, const char *name)
 
bool deleteChildrenIgnoringCase (const char *name)
 
bool deleteChildrenIgnoringCase (const char *ns, const char *name)
 
bool deleteChildren (const char *name, const char *attributename, const char *attributevalue)
 
bool deleteChildren (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
bool deleteChildrenIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
bool deleteChildrenIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
bool deleteDescendents (const char *name)
 
bool deleteDescendents (const char *ns, const char *name)
 
bool deleteDescendentsIgnoringCase (const char *name)
 
bool deleteDescendentsIgnoringCase (const char *ns, const char *name)
 
bool deleteDescendents (const char *name, const char *attributename, const char *attributevalue)
 
bool deleteDescendents (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
bool deleteDescendentsIgnoringCase (const char *name, const char *attributename, const char *attributevalue)
 
bool deleteDescendentsIgnoringCase (const char *ns, const char *name, const char *attributename, const char *attributevalue)
 
bool renameFirstChild (const char *oldname, const char *newname)
 
bool renameFirstChild (const char *oldns, const char *oldname, const char *newns, const char *newname)
 
bool renameFirstChildIgnoringCase (const char *oldname, const char *newname)
 
bool renameFirstChildIgnoringCase (const char *oldns, const char *oldname, const char *newns, const char *newname)
 
bool renameChildren (const char *oldname, const char *newname)
 
bool renameChildren (const char *oldns, const char *oldname, const char *newns, const char *newname)
 
bool renameChildrenIgnoringCase (const char *oldname, const char *newname)
 
bool renameChildrenIgnoringCase (const char *oldns, const char *oldname, const char *newns, const char *newname)
 
bool renameDescendents (const char *oldname, const char *newname)
 
bool renameDescendents (const char *oldns, const char *oldname, const char *newns, const char *newname)
 
bool renameDescendentsIgnoringCase (const char *oldname, const char *newname)
 
bool renameDescendentsIgnoringCase (const char *oldns, const char *oldname, const char *newns, const char *newname)
 
bool insertText (const char *value, uint64_t position)
 
bool appendText (const char *value)
 
bool insertAttribute (domnode *attribute, uint64_t position)
 
bool appendAttribute (domnode *attribute)
 
bool insertAttribute (const char *name, const char *value, uint64_t position)
 
bool appendAttribute (const char *name, const char *value)
 
bool deleteAttribute (uint64_t position)
 
bool deleteAttribute (const char *name)
 
bool deleteAttribute (domnode *attribute)
 
bool unwrapChild (domnode *child)
 
bool unwrapFirstChild (const char *name)
 
bool unwrapFirstChild (const char *ns, const char *name)
 
bool unwrapFirstChildIgnoringCase (const char *name)
 
bool unwrapFirstChildIgnoringCase (const char *ns, const char *name)
 
bool unwrapChildren (const char *name)
 
bool unwrapChildren (const char *ns, const char *name)
 
bool unwrapChildrenIgnoringCase (const char *name)
 
bool unwrapChildrenIgnoringCase (const char *ns, const char *name)
 
bool unwrapDescendents (const char *name)
 
bool unwrapDescendents (const char *ns, const char *name)
 
bool unwrapDescendentsIgnoringCase (const char *name)
 
bool unwrapDescendentsIgnoringCase (const char *ns, const char *name)
 
domnodewrapChild (domnode *child, const char *name)
 
domnodewrapChild (domnode *child, const char *ns, const char *name)
 
domnodewrapChildren (domnode *startchild, domnode *endchild, const char *name)
 
domnodewrapChildren (domnode *startchild, domnode *endchild, const char *ns, const char *name)
 
domnodewrapChildren (const char *name)
 
domnodewrapChildren (const char *ns, const char *name)
 
virtual domnodeclone ()
 
virtual domnodeclone (dom *dom)
 
ssize_t write ()
 
ssize_t write (bool indent)
 
ssize_t write (output *out)
 
ssize_t write (output *out, bool indent)
 
ssize_t writeXml ()
 
ssize_t writeXml (bool indent)
 
ssize_t writeXml (output *out)
 
ssize_t writeXml (output *out, bool indent)
 
stringbuffergetPath ()
 
domnodegetChildByPath (const char *path)
 
domnodegetAttributeByPath (const char *path, uint64_t position)
 
domnodegetAttributeByPath (const char *path, const char *name)
 
const char * getAttributeValueByPath (const char *path, uint64_t position)
 
const char * getAttributeValueByPath (const char *path, const char *name)
 
void setData (void *data)
 
void * getData ()
 
- Public Member Functions inherited from object
virtual ~object ()
 

Static Public Member Functions

static domnodecreateNullNode (dom *dom)
 

Detailed Description

The domnode class provides a generic container for DOM tree elements. One can navigate the nodes of the tree, modify the tree and read or modify the data that the nodes contain by calling methods in this class.

A DOM tree node can be one of the following: the document root a tag a tag attribute a segment of text a comment a segment of CDATA

Each node may contain the following data: (For some node types, the data container is unused and set to NULL) type namespace name value parent node next sibling previous sibling a list of attribute nodes a list of child nodes

Here is a breakdown by node type:

    For the document root:
            type - ROOT_DOMNODETYPE
            namespace - unused
            name - "document"
            value - unused
            parent node - unused
            next sibling - unused
            previous sibling - unused
            a list of attribute nodes - unused
            a list of child nodes - the xml version tag, the doctype tag
                                    and the top-level enclosing tag

    For a tag:
            type - TAG_DOMNODETYPE
            namespace - the tag namespace
            name - the tag name
            value - unused
            parent node - the parent tag or document root
            next sibling - can be another tag, a segment of text,
                                     a comment or a segment of cdata
            previous sibling - can be another tag, a segment of text,
                                     a comment or a segment of cdata
            a list of attribute nodes - a list of attribute nodes
            a list of child nodes - a list of tags, text segments, comments
                                    and/or cdata segments

    For a tag attribute:
            type - ATTRIBUTE_DOMNODETYPE
            namespace - unused
            name - the attribute name
            value - the attribute value
                (note that for tags with standalone
                attributes, the name and value are the same)
            parent node - the tag containing the attributes
            next sibling - the next attribute
            previous sibling - the previous attribute
            a list of attribute nodes - unused
            a list of child nodes - unused

    For a segment of text:
            type - TEXT_DOMNODETYPE
            namespace - unused
            name - "text"
            value - the text itself
            parent node - the tag containing the text
            next sibling - can be a tag, a comment or a segment of cdata
            previous sibling - can be a tag, a comment or a segment of cdata
            a list of attribute nodes - unused
            a list of child nodes - unused

    For a comment:
            type - COMMENT_DOMNODETYPE
            namespace - unused
            name - "comment"
            value - the comment itself
            parent node - the tag containing the comment
            next sibling - can be a tag, a segment of text, another
                            comment or a segment of cdata
            previous sibling - can be a tag, a segment of text, another
                            comment or a segment of cdata
            a list of attribute nodes - unused
            a list of child nodes - unused

    For a segment of cdata:
            type - CDATA_DOMNODETYPE
            namespace - unused
            name - "cdata"
            value - the cdata itself
            parent node - the tag containing the cdata
            next sibling - can be a tag, a segment of text, a comment
                            or another segment of cdata
            previous sibling - can be a tag, a segment of text, a comment
                            or another segment of cdata
            a list of attribute nodes - unused
            a list of child nodes - unused 

Constructor & Destructor Documentation

◆ domnode() [1/3]

domnode::domnode ( dom dom)

Creates a new node and intializes its member variables to NULL.

Your application should pass in a special "nullnode" which may be created by the static method createNullNode() below.

This will keep command chaining like this:

mynode->getFirstChild("node1")-> getFirstChild("node2")->getName("node3");

from causing the program to crash trying to dereference a NULL pointer if, for example, "node2" doesn't exist.

◆ domnode() [2/3]

domnode::domnode ( dom dom,
domnodetype  type,
const char *  name,
const char *  value 
)

Creates a new node (see domnode(dom *, domnode *) and intializes its member variables to the values passed in.

◆ domnode() [3/3]

domnode::domnode ( dom dom,
domnodetype  type,
const char *  ns,
const char *  name,
const char *  value 
)

Creates a new node (see domnode(dom *, domnode *) and intializes its member variables to the values passed in.

◆ ~domnode()

virtual domnode::~domnode ( )
virtual

Deletes the node, all attribute nodes and all child nodes, recursively.

Member Function Documentation

◆ appendAttribute() [1/2]

bool domnode::appendAttribute ( const char *  name,
const char *  value 
)

Creates an attribute node with "name" and "value" and appends it to the list of attributes.

◆ appendAttribute() [2/2]

bool domnode::appendAttribute ( domnode attribute)

Appends "attribute" to the list of attributes.

◆ appendChild()

bool domnode::appendChild ( domnode child)

Appends "child" to the list of child nodes.

◆ appendTag() [1/2]

domnode* domnode::appendTag ( const char *  ns,
const char *  tag 
)

Appends a new node of type TAG_DOMNODETYPE with namespace "ns" and name "tag" to the list of child nodes.

Returns the new node on success or the null node on failure.

◆ appendTag() [2/2]

domnode* domnode::appendTag ( const char *  tag)

Appends a new node of type TAG_DOMNODETYPE with name "tag" to the list of child nodes.

Returns the new node on success or the null node on failure.

◆ appendText()

bool domnode::appendText ( const char *  value)

Appends a child node of type TEXT_DOMNODE with value "value" to the list of child nodes.

◆ clone() [1/2]

virtual domnode* domnode::clone ( )
virtual

Clones this node and all of its children and returns a pointer to the clone.

◆ clone() [2/2]

virtual domnode* domnode::clone ( dom dom)
virtual

Clones this node and all of its children in tree "dom" and returns a pointer to the clone.

◆ createNullNode()

static domnode* domnode::createNullNode ( dom dom)
static

Creates a special "null node" whose parent, next sibling, previous sibling, and child point back to itself. This special node should be passed in when creating new domnodes.

This method allocates domnode internally and passes a pointer back. The calling program must ultimately deallocate the node.

◆ deleteAttribute() [1/3]

bool domnode::deleteAttribute ( const char *  name)

Searches the list of attribute nodes for an attribute named "name" and deletes it. The position of the next attribute (and all successive attributes) is decremented.

◆ deleteAttribute() [2/3]

bool domnode::deleteAttribute ( domnode attribute)

Searches the list of attribute nodes for "attribute" and deletes it. The position of the next attribute (and all successive attributes) is decremented.

◆ deleteAttribute() [3/3]

bool domnode::deleteAttribute ( uint64_t  position)

Deletes the attribute at "position". The position of the next attribute (and all successive attributes) is decremented.

◆ deleteChild() [1/2]

bool domnode::deleteChild ( domnode child)

Deletes child node "child". The position of the next sibling (and all successive siblings) is decremented.

The behavior is undefined if "child" is not actually a child of this node.

◆ deleteChild() [2/2]

bool domnode::deleteChild ( uint64_t  position)

Deletes the child node at "position". The position of the next sibling (and all successive siblings) is decremented.

◆ deleteChildren() [1/5]

bool domnode::deleteChildren ( )

Deletes all child nodes.

◆ deleteChildren() [2/5]

bool domnode::deleteChildren ( const char *  name)

Deletes all child nodes named "name".

◆ deleteChildren() [3/5]

bool domnode::deleteChildren ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all child nodes named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteChildren() [4/5]

bool domnode::deleteChildren ( const char *  ns,
const char *  name 
)

Deletes all child nodes in namespace "ns" named "name".

◆ deleteChildren() [5/5]

bool domnode::deleteChildren ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all child nodes in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteChildrenIgnoringCase() [1/4]

bool domnode::deleteChildrenIgnoringCase ( const char *  name)

Deletes all child nodes named "name" (ignoring case).

◆ deleteChildrenIgnoringCase() [2/4]

bool domnode::deleteChildrenIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all child nodes named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteChildrenIgnoringCase() [3/4]

bool domnode::deleteChildrenIgnoringCase ( const char *  ns,
const char *  name 
)

Deletes all child nodes in namespace "ns" named "name" (both ignoring case).

◆ deleteChildrenIgnoringCase() [4/4]

bool domnode::deleteChildrenIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all child nodes in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute name "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteDescendents() [1/4]

bool domnode::deleteDescendents ( const char *  name)

Deletes all descendents named "name".

◆ deleteDescendents() [2/4]

bool domnode::deleteDescendents ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all descendents named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent is not checked, and the first descendent with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteDescendents() [3/4]

bool domnode::deleteDescendents ( const char *  ns,
const char *  name 
)

Deletes all descendents in namespace "ns" named "name".

◆ deleteDescendents() [4/4]

bool domnode::deleteDescendents ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all descendents in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent is not checked, and the first descendent with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteDescendentsIgnoringCase() [1/4]

bool domnode::deleteDescendentsIgnoringCase ( const char *  name)

Deletes all descendents named "name" (ignoring case).

◆ deleteDescendentsIgnoringCase() [2/4]

bool domnode::deleteDescendentsIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all descendents named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent is not checked, and the first descendent with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteDescendentsIgnoringCase() [3/4]

bool domnode::deleteDescendentsIgnoringCase ( const char *  ns,
const char *  name 
)

Deletes all descendents in namespace "ns" named "name" (both ignoring case).

◆ deleteDescendentsIgnoringCase() [4/4]

bool domnode::deleteDescendentsIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes all descendents in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent is not checked, and the first descendent with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteFirstChild() [1/4]

bool domnode::deleteFirstChild ( const char *  name)

Deletes the first child named "name". The position of the next sibling (and all successive siblings) is decremented.

◆ deleteFirstChild() [2/4]

bool domnode::deleteFirstChild ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes the first child node named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteFirstChild() [3/4]

bool domnode::deleteFirstChild ( const char *  ns,
const char *  name 
)

Deletes the first child in namespace "ns" named "name". The position of the next sibling (and all successive siblings) is decremented.

◆ deleteFirstChild() [4/4]

bool domnode::deleteFirstChild ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes the first child node in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteFirstChildIgnoringCase() [1/4]

bool domnode::deleteFirstChildIgnoringCase ( const char *  name)

Deletes the first child named "name" (ignoring case). The position of the next sibling (and all successive siblings) is decremented.

◆ deleteFirstChildIgnoringCase() [2/4]

bool domnode::deleteFirstChildIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes the first child node named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ deleteFirstChildIgnoringCase() [3/4]

bool domnode::deleteFirstChildIgnoringCase ( const char *  ns,
const char *  name 
)

Deletes the first child in namespace "ns" named "name" (both ignoring case). The position of the next sibling (and all successive siblings) is decremented.

◆ deleteFirstChildIgnoringCase() [4/4]

bool domnode::deleteFirstChildIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Deletes the first child node in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getAttribute() [1/2]

virtual domnode* domnode::getAttribute ( const char *  name)
virtual

Returns the attribute named "name" or the nullnode if not found.

◆ getAttribute() [2/2]

virtual domnode* domnode::getAttribute ( uint64_t  position)
virtual

Returns the attribute node at index "position" or the nullnode if not found.

◆ getAttributeByPath() [1/2]

domnode* domnode::getAttributeByPath ( const char *  path,
const char *  name 
)

Returns the attribute node named "name" of the child element with "path" of the form:

/element[index]/element[index]/...

Returns the null node if the specified element was not found.

◆ getAttributeByPath() [2/2]

domnode* domnode::getAttributeByPath ( const char *  path,
uint64_t  position 
)

Returns the attribute node at index "position" of the child element with "path" of the form:

/element[index]/element[index]/...

Returns the null node if the specified element was not found.

◆ getAttributeCount()

virtual uint64_t domnode::getAttributeCount ( )
virtual

Returns the number of attributes.

◆ getAttributeIgnoringCase()

virtual domnode* domnode::getAttributeIgnoringCase ( const char *  name)
virtual

Returns the attribute named "name" (ignoring case) or the nullnode if not found.

◆ getAttributes()

dictionary<const char *, const char *>* domnode::getAttributes ( )

Returns the attribute names and values in a dictionary. The dictionary is allocated internally and must be deleted by the calling program. Returns NULL if the node is a nullNode and an empty dictionary if the node has no attributes.

◆ getAttributeValue() [1/2]

const char* domnode::getAttributeValue ( const char *  name)

Returns the value of the attribute named "name" or the nullnode if not found.

◆ getAttributeValue() [2/2]

const char* domnode::getAttributeValue ( uint64_t  position)

Returns the value of the attribute node at index "position" or the nullnode if not found.

◆ getAttributeValueByPath() [1/2]

const char* domnode::getAttributeValueByPath ( const char *  path,
const char *  name 
)

Returns the value of the attribute named "name" of the child element with "path" of the form:

/element[index]/element[index]/...

Returns the null node if the specified element was not found.

◆ getAttributeValueByPath() [2/2]

const char* domnode::getAttributeValueByPath ( const char *  path,
uint64_t  position 
)

Returns the value of the attribute at index "position" of the child element with "path" of the form:

/element[index]/element[index]/...

Returns the null node if the specified element was not found.

◆ getChild()

domnode* domnode::getChild ( uint64_t  position)

Returns the child node at index "position" or the nullnode if not found.

◆ getChildByPath()

domnode* domnode::getChildByPath ( const char *  path)

Returns the child element with "path" of the form:

/element[index]/element[index]/...

Returns the null node if the specified element was not found.

◆ getChildCount()

virtual uint64_t domnode::getChildCount ( )
virtual

Returns the number of immediate child nodes.

◆ getData()

void* domnode::getData ( )

Allows an app to get the arbitrary data associated with the node using setData().

◆ getFirstChild() [1/5]

virtual domnode* domnode::getFirstChild ( )
virtual

Returns the first child node or the nullnode if no children are found.

◆ getFirstChild() [2/5]

domnode* domnode::getFirstChild ( const char *  name)

Returns the first child node named "name" or the nullnode if not found.

◆ getFirstChild() [3/5]

domnode* domnode::getFirstChild ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node named "name" with an attribute named "attributename" with value "attributevalue". If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstChild() [4/5]

domnode* domnode::getFirstChild ( const char *  ns,
const char *  name 
)

Returns the first child node in namespace "ns" named "name" or the nullnode if not found.

◆ getFirstChild() [5/5]

domnode* domnode::getFirstChild ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue". If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstChildIgnoringCase() [1/4]

domnode* domnode::getFirstChildIgnoringCase ( const char *  name)

Returns the child node named "name" (ignoring case) or the nullnode if not found.

◆ getFirstChildIgnoringCase() [2/4]

domnode* domnode::getFirstChildIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case). If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstChildIgnoringCase() [3/4]

domnode* domnode::getFirstChildIgnoringCase ( const char *  ns,
const char *  name 
)

Returns the child node in namespace "ns" (ignoring case) named "name" (ignoring case) or the nullnode if not found.

◆ getFirstChildIgnoringCase() [4/4]

domnode* domnode::getFirstChildIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case). If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagChild() [1/5]

domnode* domnode::getFirstTagChild ( )

Returns the first child node whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagChild() [2/5]

domnode* domnode::getFirstTagChild ( const char *  name)

Returns the first child node named "name" whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagChild() [3/5]

domnode* domnode::getFirstTagChild ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagChild() [4/5]

domnode* domnode::getFirstTagChild ( const char *  ns,
const char *  name 
)

Returns the first child node in namespace "ns" named "name" whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagChild() [5/5]

domnode* domnode::getFirstTagChild ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagChildIgnoringCase() [1/4]

domnode* domnode::getFirstTagChildIgnoringCase ( const char *  name)

Returns the first child node named "name" (ignoring case) whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagChildIgnoringCase() [2/4]

domnode* domnode::getFirstTagChildIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagChildIgnoringCase() [3/4]

domnode* domnode::getFirstTagChildIgnoringCase ( const char *  ns,
const char *  name 
)

Returns the first child node in namespace "ns" named "name" (both ignoring case) whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagChildIgnoringCase() [4/4]

domnode* domnode::getFirstTagChildIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first child node in namespace "ns" (ignoring case) named "name" * (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagChildInSet() [1/2]

domnode* domnode::getFirstTagChildInSet ( const char *const *  set)

Returns the first child node whose type is TAG_DOMNODE and whose name matches one of the members of the NULL-terminated array "set". If no match is found, nullnode is returned.

◆ getFirstTagChildInSet() [2/2]

domnode* domnode::getFirstTagChildInSet ( const char *  ns,
const char *const *  set 
)

Returns the first child node in namespace "ns" whose name matches one of the members of the NULL-terminated array "set" and whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagDescendent() [1/4]

domnode* domnode::getFirstTagDescendent ( const char *  name)

Returns the first descendent node named "name" whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagDescendent() [2/4]

domnode* domnode::getFirstTagDescendent ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first descendent node named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent node is not checked, and the first descendent node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagDescendent() [3/4]

domnode* domnode::getFirstTagDescendent ( const char *  ns,
const char *  name 
)

Returns the first descendent node in namespace "ns" named "name" whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagDescendent() [4/4]

domnode* domnode::getFirstTagDescendent ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first descendent node in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent node is not checked, and the first descendent node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagDescendentIgnoringCase() [1/4]

domnode* domnode::getFirstTagDescendentIgnoringCase ( const char *  name)

Returns the first descendent node named "name" (ignoring case) whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagDescendentIgnoringCase() [2/4]

domnode* domnode::getFirstTagDescendentIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first descendent node named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent node is not checked, and the first descendent node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagDescendentIgnoringCase() [3/4]

domnode* domnode::getFirstTagDescendentIgnoringCase ( const char *  ns,
const char *  name 
)

Returns the first descendent node in namespace "ns" named "name" (both ignoring case) whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getFirstTagDescendentIgnoringCase() [4/4]

domnode* domnode::getFirstTagDescendentIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the first descendent node in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the descendent node is not checked, and the first descendent node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getFirstTagDescendentInSet() [1/2]

domnode* domnode::getFirstTagDescendentInSet ( const char *const *  set)

Returns the first descendent node whose type is TAG_DOMNODE and whose name matches one of the members of the NULL-terminated array "set". If no match is found, nullnode is returned.

◆ getFirstTagDescendentInSet() [2/2]

domnode* domnode::getFirstTagDescendentInSet ( const char *  ns,
const char *const *  set 
)

Returns the first descendent node in namespace "ns" whose name matches one of the members of the NULL-terminated array "set" and whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getName()

virtual const char* domnode::getName ( )
virtual

Returns the name of the node.

◆ getNamespace()

virtual const char* domnode::getNamespace ( )
virtual

Returns the namespace of the node.

◆ getNextSibling()

virtual domnode* domnode::getNextSibling ( )
virtual

Returns a pointer to the next sibling node or the nullnode if none exists.

◆ getNextTag() [1/2]

domnode* domnode::getNextTag ( )

Returns the next node in a depth-first traversal whose type is TAG_DOMNODE.

◆ getNextTag() [2/2]

domnode* domnode::getNextTag ( domnode top)

Returns the next node in a depth-first traversal of the nodes beneath "top" whose type is TAG_DOMNODE.

The behavior is undefined if "top" is not a direct ancestor of this node.

◆ getNextTagSibling() [1/5]

domnode* domnode::getNextTagSibling ( )

Returns a pointer to the next sibling node whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getNextTagSibling() [2/5]

domnode* domnode::getNextTagSibling ( const char *  name)

Returns the next sibling node named "name" whose type is TAG_DOMNODE or the nullnode if not found.

◆ getNextTagSibling() [3/5]

domnode* domnode::getNextTagSibling ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the next sibling node named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getNextTagSibling() [4/5]

domnode* domnode::getNextTagSibling ( const char *  ns,
const char *  name 
)

Returns the next sibling node in namespace "ns" named "name" whose type is TAG_DOMNODE or the nullnode if not found.

◆ getNextTagSibling() [5/5]

domnode* domnode::getNextTagSibling ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the next sibling node in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getNextTagSiblingIgnoringCase() [1/4]

domnode* domnode::getNextTagSiblingIgnoringCase ( const char *  name)

Returns the next sibling node named "name" (ignoring case) whose type is TAG_DOMNODE or the nullnode if not found.

◆ getNextTagSiblingIgnoringCase() [2/4]

domnode* domnode::getNextTagSiblingIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the next sibling node named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getNextTagSiblingIgnoringCase() [3/4]

domnode* domnode::getNextTagSiblingIgnoringCase ( const char *  ns,
const char *  name 
)

Returns the next sibling node in namespace "ns" named "name" (both ignoring case) whose type is TAG_DOMNODE or the nullnode if not found.

◆ getNextTagSiblingIgnoringCase() [4/4]

domnode* domnode::getNextTagSiblingIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the next sibling node in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getNextTagSiblingInSet() [1/2]

domnode* domnode::getNextTagSiblingInSet ( const char *const *  set)

Returns the next sibling node whose type is TAG_DOMNODE and whose name matches one of the members of the NULL-terminated array "set". If no match is found, nullnode is returned.

◆ getNextTagSiblingInSet() [2/2]

domnode* domnode::getNextTagSiblingInSet ( const char *  ns,
const char *const *  set 
)

Returns the next sibling node in namespace "ns" whose name matches one of the members of the NULL-terminated array "set" and whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getNullNode()

domnode* domnode::getNullNode ( )

Returns the nullnode used by this node.

◆ getParent()

virtual domnode* domnode::getParent ( )
virtual

Returns a pointer to the parent node or the nullnode if none exists.

◆ getPath()

stringbuffer* domnode::getPath ( )

If the domnode is an element, returns the "path" of the domnode. The path will have the following form:

/element[index]/element[index]/...

The return value is allocated inside the method and must be deallocated by the calling program.

◆ getPosition()

virtual uint64_t domnode::getPosition ( )
virtual

Returns the position of the node, relative to its siblings.

◆ getPreviousSibling()

virtual domnode* domnode::getPreviousSibling ( )
virtual

Returns a pointer to the previous sibling node or the nullnode if none exists.

◆ getPreviousTag() [1/2]

domnode* domnode::getPreviousTag ( )

Returns the previous node in a depth-first traversal whose type is TAG_DOMNODE.

◆ getPreviousTag() [2/2]

domnode* domnode::getPreviousTag ( domnode top)

Returns the previous node in a depth-first traversal of the nodes beneath "top" whose type is TAG_DOMNODE.

The behavior is undefined if "top" is not a direct ancestor of this node.

◆ getPreviousTagSibling() [1/5]

domnode* domnode::getPreviousTagSibling ( )

Returns a pointer to the previous sibling node whose type is TAG_DOMNODE. If no match is found, nullnode is returned.

◆ getPreviousTagSibling() [2/5]

domnode* domnode::getPreviousTagSibling ( const char *  name)

Returns the previous sibling node named "name" whose type is TAG_DOMNODE or the nullnode if not found.

◆ getPreviousTagSibling() [3/5]

domnode* domnode::getPreviousTagSibling ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the previous sibling node named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getPreviousTagSibling() [4/5]

domnode* domnode::getPreviousTagSibling ( const char *  ns,
const char *  name 
)

Returns the previous sibling node in namespace "ns" named "name" whose type is TAG_DOMNODE or the nullnode if not found.

◆ getPreviousTagSibling() [5/5]

domnode* domnode::getPreviousTagSibling ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the previous sibling node in namespace "ns" named "name" with an attribute named "attributename" with value "attributevalue" whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getPreviousTagSiblingIgnoringCase() [1/4]

domnode* domnode::getPreviousTagSiblingIgnoringCase ( const char *  name)

Returns the previous sibling node named "name" (ignoring case) whose type is TAG_DOMNODE or the nullnode if not found.

◆ getPreviousTagSiblingIgnoringCase() [2/4]

domnode* domnode::getPreviousTagSiblingIgnoringCase ( const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the previous sibling node named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getPreviousTagSiblingIgnoringCase() [3/4]

domnode* domnode::getPreviousTagSiblingIgnoringCase ( const char *  ns,
const char *  name 
)

Returns the previous sibling node in namespace "napesp" named "name" (both ignoring case) whose type is TAG_DOMNODE or the nullnode if not found.

◆ getPreviousTagSiblingIgnoringCase() [4/4]

domnode* domnode::getPreviousTagSiblingIgnoringCase ( const char *  ns,
const char *  name,
const char *  attributename,
const char *  attributevalue 
)

Returns the previous sibling node in namespace "ns" (ignoring case) named "name" (ignoring case) with an attribute named "attributename" with value "attributevalue" (both ignoring case) whose type is TAG_DOMNODE. If "name" is null, then the name of the child node is not checked, and the first child node with any name (with matching attribute name/value) will be returned. If no match is found, nullnode is returned.

◆ getTree()

dom* domnode::getTree ( )

Returns a pointer to the tree that this node is attached to or NULL if it isn't attached to any tree.

◆ getType()

virtual domnodetype domnode::getType ( )
virtual

Returns the type of the node.

◆ getValue()

virtual const char* domnode::getValue ( )
virtual

Returns the value of node.

◆ insertAttribute() [1/2]

bool domnode::insertAttribute ( const char *  name,
const char *  value,
uint64_t  position 
)

Creates an attribute node with "name" and "value" and inserts it into the list of attributes at "position". The position of the next attribute (and all successive attributes) is incremented.

◆ insertAttribute() [2/2]

bool domnode::insertAttribute ( domnode attribute,
uint64_t  position 
)

Inserts "attribute" into the list of attributes at "position". The position of the next attribute (and all successive attributes) is incremented.

◆ insertChild()

bool domnode::insertChild ( domnode child,
uint64_t  position 
)

Inserts "child" into the list of child nodes at "position". The position of the next sibling (and all successive siblings) is incremented.

◆ insertTag() [1/2]

domnode* domnode::insertTag ( const char *  ns,
const char *  tag,
uint64_t  position 
)

Inserts a new node of type TAG_DOMNODETYPE with namespace "ns" and name "tag" into the list of child nodes at "position". The position of the next sibling (and all successive siblings) is incremented.

Returns the new node on success or the null node on failure.

◆ insertTag() [2/2]

domnode* domnode::insertTag ( const char *  tag,
uint64_t  position 
)

Inserts a new node of type TAG_DOMNODETYPE with name "tag" into the list of child nodes at "position". The position of the next sibling (and all successive siblings) is incremented.

Returns the new node on success or the null node on failure.

◆ insertText()

bool domnode::insertText ( const char *  value,
uint64_t  position 
)

Inserts a child node of type TEXT_DOMNODE with value "value" into the list of child nodes at "position". The position of the next sibling (and all successive siblings) is incremented.

◆ isNullNode()

virtual bool domnode::isNullNode ( )
virtual

Returns true if this node is the special nullnode and false otherwise.

◆ moveChild()

bool domnode::moveChild ( domnode child,
domnode parent,
uint64_t  position 
)

Moves "child" from its current position into the list of child nodes for "parent" at "position".

The behavior is undefined if "child" is not actually a child of this node.

◆ renameChildren() [1/2]

bool domnode::renameChildren ( const char *  oldname,
const char *  newname 
)

Finds all child nodes named "oldname" and renames them "newname".

◆ renameChildren() [2/2]

bool domnode::renameChildren ( const char *  oldns,
const char *  oldname,
const char *  newns,
const char *  newname 
)

Finds all child nodes named "oldname" in namespace "oldns" and renames them "newname" with namespace "newns".

◆ renameChildrenIgnoringCase() [1/2]

bool domnode::renameChildrenIgnoringCase ( const char *  oldname,
const char *  newname 
)

Finds all child nodes named "oldname" (ignoring case) and renames them "newname".

◆ renameChildrenIgnoringCase() [2/2]

bool domnode::renameChildrenIgnoringCase ( const char *  oldns,
const char *  oldname,
const char *  newns,
const char *  newname 
)

Finds all child nodes named "oldname" in namespace "oldns" (both ignoring case) and renames them "newname" with namespace "newns".

◆ renameDescendents() [1/2]

bool domnode::renameDescendents ( const char *  oldname,
const char *  newname 
)

Finds all descendents named "oldname" and renames them "newname".

◆ renameDescendents() [2/2]

bool domnode::renameDescendents ( const char *  oldns,
const char *  oldname,
const char *  newns,
const char *  newname 
)

Finds all descendents named "oldname" in namespace "oldns" and renames them "newname" with namespace "newns".

◆ renameDescendentsIgnoringCase() [1/2]

bool domnode::renameDescendentsIgnoringCase ( const char *  oldname,
const char *  newname 
)

Finds all descendents named "oldname" (ignoring case) and renames them "newname".

◆ renameDescendentsIgnoringCase() [2/2]

bool domnode::renameDescendentsIgnoringCase ( const char *  oldns,
const char *  oldname,
const char *  newns,
const char *  newname 
)

Finds all descendents named "oldname" in namespace "oldns" (both ignoring case) and renames them "newname" with namespace "newns".

◆ renameFirstChild() [1/2]

bool domnode::renameFirstChild ( const char *  oldname,
const char *  newname 
)

Finds the first child node named "oldname" and renames it "newname".

◆ renameFirstChild() [2/2]

bool domnode::renameFirstChild ( const char *  oldns,
const char *  oldname,
const char *  newns,
const char *  newname 
)

Finds the first child node named "oldname" in namespace "oldns" and renames it "newname" with namespace "newns".

◆ renameFirstChildIgnoringCase() [1/2]

bool domnode::renameFirstChildIgnoringCase ( const char *  oldname,
const char *  newname 
)

Finds the first child node named "oldname" (ignoring case) and renames it "newname".

◆ renameFirstChildIgnoringCase() [2/2]

bool domnode::renameFirstChildIgnoringCase ( const char *  oldns,
const char *  oldname,
const char *  newns,
const char *  newname 
)

Finds the first child node named "oldname" in namespace "oldns" (both ignoring case) and renames it "newname" with namespace "newns".

◆ setAttributeValue() [1/3]

void domnode::setAttributeValue ( const char *  name,
const char *  value 
)

Sets the value of the attribute named "name" to "value". Creates attribute "name" if it didn't previously exist.

◆ setAttributeValue() [2/3]

void domnode::setAttributeValue ( const char *  name,
int64_t  value 
)

Sets the value of the attribute named "name" to "value". Creates attribute "name" if it didn't previously exist.

◆ setAttributeValue() [3/3]

void domnode::setAttributeValue ( const char *  name,
uint64_t  value 
)

Sets the value of the attribute named "name" to "value". Creates attribute "name" if it didn't previously exist.

◆ setData()

void domnode::setData ( void *  data)

Allows an app to associate arbitrary data with the node.

◆ setName() [1/2]

virtual void domnode::setName ( const char *  name)
virtual

Sets the node name to "name".

◆ setName() [2/2]

void domnode::setName ( const char *  ns,
const char *  name 
)

Sets the node namespace to "ns" and node name to "name".

◆ setNamespace()

virtual void domnode::setNamespace ( const char *  ns)
virtual

Sets the node namespace to "ns".

◆ setNextSibling()

virtual void domnode::setNextSibling ( domnode next)
virtual

Sets the next sibling of the node to "next".

◆ setParent()

virtual void domnode::setParent ( domnode parent)
virtual

Sets the parent of the node to "parent".

◆ setPreviousSibling()

virtual void domnode::setPreviousSibling ( domnode previous)
virtual

Sets the previous sibling of the node to "previous".

◆ setType()

virtual void domnode::setType ( domnodetype  type)
virtual

Sets the node type to "type".

◆ setValue()

virtual void domnode::setValue ( const char *  value)
virtual

Sets the node value to "value".

◆ unwrapChild()

bool domnode::unwrapChild ( domnode child)

Moves all children of "child" out of "child" and then deletes "child".

The behavior is undefined if "child" is not actually a child of this node.

◆ unwrapChildren() [1/2]

bool domnode::unwrapChildren ( const char *  name)

For each tag child named "name", moves all children out of the tag, then deletes the tag.

◆ unwrapChildren() [2/2]

bool domnode::unwrapChildren ( const char *  ns,
const char *  name 
)

For each tag child in namespace "ns" named "name", moves all children out of the tag, then deletes the tag.

◆ unwrapChildrenIgnoringCase() [1/2]

bool domnode::unwrapChildrenIgnoringCase ( const char *  name)

For each tag child named "name" (ignoring case), moves all children out of the tag, then deletes the tag.

◆ unwrapChildrenIgnoringCase() [2/2]

bool domnode::unwrapChildrenIgnoringCase ( const char *  ns,
const char *  name 
)

For each tag child in namespace "ns" named "name" (both ignoring case), moves all children out of the tag, then deletes the tag.

◆ unwrapDescendents() [1/2]

bool domnode::unwrapDescendents ( const char *  name)

For each tag descendent named "name", moves all children out of the tag, then deletes the tag.

◆ unwrapDescendents() [2/2]

bool domnode::unwrapDescendents ( const char *  ns,
const char *  name 
)

For each tag descendent in namespace "ns" named "name", moves all children out of the tag, then deletes the tag.

◆ unwrapDescendentsIgnoringCase() [1/2]

bool domnode::unwrapDescendentsIgnoringCase ( const char *  name)

For each tag descendent named "name" (ignoring case), moves all children out of the tag, then deletes the tag.

◆ unwrapDescendentsIgnoringCase() [2/2]

bool domnode::unwrapDescendentsIgnoringCase ( const char *  ns,
const char *  name 
)

For each tag descendent in namespace "ns" named "name" (both ignoring case), moves all children out of the tag, then deletes the tag.

◆ unwrapFirstChild() [1/2]

bool domnode::unwrapFirstChild ( const char *  name)

Finds the first tag child named "name", moves all children out of the tag, then deletes the tag.

◆ unwrapFirstChild() [2/2]

bool domnode::unwrapFirstChild ( const char *  ns,
const char *  name 
)

Finds the first tag child in namespace "ns" named "name", moves all children out of the tag, then deletes the tag.

◆ unwrapFirstChildIgnoringCase() [1/2]

bool domnode::unwrapFirstChildIgnoringCase ( const char *  name)

Finds the first tag child named "name" (ignoring case), moves all children out of the tag, then deletes the tag.

◆ unwrapFirstChildIgnoringCase() [2/2]

bool domnode::unwrapFirstChildIgnoringCase ( const char *  ns,
const char *  name 
)

Finds the first tag child in namespace "ns" named "name" (both ignoring case), moves all children out of the tag, then deletes the tag.

◆ wrapChild() [1/2]

domnode* domnode::wrapChild ( domnode child,
const char *  name 
)

Wraps the specified child with a tag named "name". Returns the newly new created tag node.

The behavior is undefined if "child" is not actually a child of this node.

◆ wrapChild() [2/2]

domnode* domnode::wrapChild ( domnode child,
const char *  ns,
const char *  name 
)

Wraps the specified child with a tag named "name" with namespace "ns". Returns the newly new created tag node.

The behavior is undefined if "child" is not actually a child of this node.

◆ wrapChildren() [1/4]

domnode* domnode::wrapChildren ( const char *  name)

Wraps all children of the current node with a tag named "name". Returns the newly new created tag node.

◆ wrapChildren() [2/4]

domnode* domnode::wrapChildren ( const char *  ns,
const char *  name 
)

Wraps all children of the current node with a tag named "name" with namespace "ns". Returns the newly new created tag node.

◆ wrapChildren() [3/4]

domnode* domnode::wrapChildren ( domnode startchild,
domnode endchild,
const char *  name 
)

Wraps the specified children with a tag named "name". Returns the newly new created tag node.

"startchild" and "endchild" should be children of the current node, and siblings, and not the null node. The position of "endchild" should be >= the position of "startchild". The behavior is undefined if any of these conditions are not met.

◆ wrapChildren() [4/4]

domnode* domnode::wrapChildren ( domnode startchild,
domnode endchild,
const char *  ns,
const char *  name 
)

Wraps the specified children with a tag named "name" with namespace "ns". Returns the newly new created tag node.

"startchild" and "endchild" should be children of the current node, and siblings, and not the null node. The position of "endchild" should be >= the position of "startchild". The behavior is undefined if any of these conditions are not met.

◆ write() [1/4]

ssize_t domnode::write ( )

Writes a text representation of the tree starting at this node to standard output.

◆ write() [2/4]

ssize_t domnode::write ( bool  indent)

Writes a text representation of the tree starting at this node to standard output.

If "indent" is true then the output is automatically indented. If "indent" is false, then the domnode is output as-is.

◆ write() [3/4]

ssize_t domnode::write ( output out)

Writes a text representation of the tree starting at this node into "out" which can be an instance of stringbuffer, filedescriptor, or any other class that implements the output interface.

◆ write() [4/4]

ssize_t domnode::write ( output out,
bool  indent 
)

Writes a text representation of the tree starting at this node into "out" which can be an instance of stringbuffer, filedescriptor, or any other class that implements the output interface.

If "indent" is true then the output is automatically indented. If "indent" is false, then the domnode is output as-is.

◆ writeXml() [1/4]

ssize_t domnode::writeXml ( )

Writes a text representation, in XML format, of the tree starting at this node to standard output.

◆ writeXml() [2/4]

ssize_t domnode::writeXml ( bool  indent)

Writes a text representation, in XML format, of the tree starting at this node to standard output.

If "indent" is true then the output is automatically indented. If "indent" is false, then the domnode is output as-is.

◆ writeXml() [3/4]

ssize_t domnode::writeXml ( output out)

Writes a text representation, in XML format, of the tree starting at this node into "out" which can be an instance of stringbuffer, filedescriptor, or any other class that implements the output interface.

◆ writeXml() [4/4]

ssize_t domnode::writeXml ( output out,
bool  indent 
)

Writes a text representation, in XML format, of the tree starting at this node into "out" which can be an instance of stringbuffer, filedescriptor, or any other class that implements the output interface.

If "indent" is true then the output is automatically indented. If "indent" is false, then the domnode is output as-is.