OScript API/Built-in Package Index |
The DOMNode interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results in a DOMException being raised. The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment), this returns null. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.
The node is a DOMAttr.
The node is a DOMCDATASection.
The node is a DOMComment.
The node is a DOMDocumentFragment.
The node is a DOMDocument.
The node is a DOMDocumentType.
The node is an DOMElement.
The node is a DOMNode.
The node is a DOMEntityReference.
The node is a DOMNotation.
The node is a DOMProcessingInstruction.
The node is a DOMText.
Append the newChild node.
Cast the node to the appropriate type.
Duplicate the node.
The attributes of this node.
A list of child nodes.
The first child of this node.
The last child of this node.
Returns the local part of the qualified name of this node.
Get the namespace URI of this node, or undefined if it is not specified.
The next sibling of this node.
The name of this node.
The type of node.
The value of this node.
The DOMDocument object that this node belongs to.
The parent of this node.
Get the namespace prefix of this node, or undefined.
The previous sibling of this node.
Determine if a node has attributes.
Determine if a node has children.
Insert the newChild node before the refChild node.
Returns true if the specified feature is supported on this node, false otherwise.
Sets the mustRelease flag if optional parameter is specified, else returns the current value.
Puts all DOMText nodes in the full depth of the sub-tree underneath this DOMNode into a "normal" form where only markup separates DOMText nodes.
Remove the oldChild node.
Replace the oldChild node with the newChild node.
Sets the value of the this node.
Set the namespace prefix of this node.
The node is an DOMAttr.
The node is an DOMCDATASection.
The node is an DOMComment.
The node is an DOMDocumentFragment.
The node is an DOMDocument.
The node is an DOMDocumentType.
The node is an DOMElement.
The node is an DOMEntity.
The node is an DOMEntityReference.
The node is an DOMNotation.
The node is an DOMProcessingInstruction.
The node is an DOMText.
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
The node to add.
The node added.
Cast the DOMNode to the appropriate type.
The actual type of this node (e.g. DOMElement, DOMText, etc.).
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent (parentNode returns null.). Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node. Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly.
If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
The duplicate node.
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
A NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes. The content of the returned NodeList is "live" in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeList accessors; it is not a static snapshot of the content of the node. This is true for every NodeList, including the ones returned by the getElementsByTagName method.
A DOMNodeList of the children.
The first child of this node. If there is no such node, this returns null.
A DOMNode representing the first child.
The last child of this node. If there is no such node, this returns null.
A DOMNode representing the last child.
Returns the local part of the qualified name of this node.
The local part of the qualified name.
Get the namespace URI of this node, or undefined if it is not specified.
Namespace URI or undefined.
The node immediately following this node. If there is no such node, this returns null.
The node immediately following this node.
A code representing the type of the underlying object, as defined above.
A code representing the type of the underlying object.
The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect.
The value of this node.
The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null.
The Document object associated with this node.
The parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.
A DOMNode that represents the parent.
Get the namespace prefix of this node, or undefined.
The namespace prefix or undefined.
The node immediately preceding this node. If there is no such node, this returns null.
The node immediately preceding this node.
Determine if a node has attributes.
TRUE if this node has any attributes, FALSE otherwise.
This is a convenience method to allow easy determination of whether a node has any children.
True if the node has any children, false if the node has no children.
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children. If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.
The node to insert.
The reference node, i.e., the node before which the new node must be inserted.
The node being inserted
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
The feature name to tested.
This is the version number of the feature to test.
TRUE if the specified feature is supported on this node, FALSE otherwise.
Sets the mustRelease flag if the optional parameter is specified, else returns the current value. If mustRelease is set to TRUE then the DOMNode is released when the object goes out of scope.
Value to set.
The current value.
Puts all DOMText nodes in the full depth of the sub-tree underneath this DOMNode, including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates DOMText nodes, i.e., there are neither adjacent DOMText nodes nor empty DOMText nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.
Removes the child node indicated by oldChild from the list of children, and returns it.
The node being removed.
The node removed.
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If newChild is a DocumentFragment object, refChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.
The new node to put in the child list.
The node being replaced in the list.
The node replaced.
Sets the value of the node.
The value to set the node
Set the namespace prefix of this node.
The prefix value
Copyright © 2021 OpenText Corporation. All rights reserved. |