GPL includes an XmlNode class that provides access to and manipulation of individual nodes within a DOM tree.
XmlNode objects point to DOM nodes but do not actually contain the DOM nodes. When an XmlNode object is created or destroyed, the underlying DOM nodes are not affected provided that they are part of a DOM tree. If a DOM node is destroyed by releasing the top-level XmlDoc node or by releasing a parent DOM node, the XmlNode object is automatically unlinked from the DOM node and any attempt to use the XmlNode object results in an error.
Table 19-45 summarizes the properties and methods for the XmlNode class. Each of these properties and methods is described in detail in the GPL Dictionary contained in the Software Reference section of the PreciseFlex Library.
| XmlNode Class Member | Type | Description |
|---|---|---|
|
xmlnode_obj.AddAttribute |
Method |
Adds an attribute node as a child of this node. |
|
xmlnode_obj.AddElement |
Method |
Adds an element node as a child of this node. Includes an optional value. |
|
xmlnode_obj.AddElementNode |
Method |
Adds an element node as a child of this node. Returns an XmlNode object for the new node. Includes an optional value. |
|
xmlnode_obj.AppendChild |
Method |
Appends a new child node as the last child of this node. Merges text nodes. |
|
xmlnode_obj.ChildNodeCount |
Get Property |
Returns the number of children of this node. |
|
xmlnode_obj.Clone |
Method |
Returns a clone of this node. Optionally recursively clones the subtree under this node. |
|
xmlnode_obj.FirstChild |
Method |
Returns the first child of this node. |
|
xmlnode_obj.GetAttribute |
Method |
Returns a String containing the value of the specified attribute that is a child of this node. |
|
xmlnode_obj.GetAttributeNode |
Method |
Returns the node corresponding to the specified attribute that is a child of this node. |
|
xmlnode_obj.GetElement |
Method |
Returns a String containing the value of the specified element that is a child of this node. |
|
xmlnode_obj.GetElementNode |
Method |
Returns the node corresponding to the specified element that is a child of this node. |
|
xmlnode_obj.HasAttribute |
Method |
Returns True if the specified attribute is a child of this node. |
|
xmlnode_obj.HasChildNodes |
Get Property |
Returns True if the node has any non-attribute child nodes. |
|
xmlnode_obj.HasElement |
Method |
Returns True if a specified element is a child of this node. |
|
xmlnode_obj.InsertAfter |
Method |
Inserts a new node as a child of this node after a referenced child node. Merges text nodes. |
|
xmlnode_obj.InsertBefore |
Method |
Inserts a new node as a child of this node before a referenced child node. Merges text nodes. |
|
xmlnode_objLastChild |
Method |
Returns the last child of this node. |
|
xmlnode_obj.Name |
Get Property |
Returns the node name as a String. |
|
xmlnode_obj.NextSibling |
Method |
Returns the next sibling of this node. |
|
xmlnode_obj.OwnerDocument |
Method |
Returns the XmlDoc associated with this node. |
|
xmlnode_obj.ParentNode |
Method |
Returns the parent of this node. |
|
xmlnode_obj.PreviousSibling |
Method |
Returns the previous sibling of this node. |
|
xmlnode_obj.RemoveAttribute |
Method |
Removes a specified attribute from this node's children. |
|
xmlnode_obj.RemoveChild |
Method |
Removes a child node from the list of children for this node. |
|
xmlnode_obj.RemoveElement |
Method |
Removes a specified element from this node's children. |
|
xmlnode_obj.ReplaceChild |
Method |
Replaces an old child node with a new child node. |
|
xmlnode_obj.SetAttribute |
Method |
Sets the value of an existing specified attribute that is a child of this node. |
|
xmlnode_obj.SetElement |
Method |
Sets the value of an existing specified element that is a child of this node. |
|
xmlnode_obj.Type |
Get Property |
Returns the node type as a String. |
|
xmlnode_obj.Value |
Method |
Returns the node value as a String or sets the node value. |