WebDOMNode - Kirix Documentation

Developer Resources

WebDOMNode

Overview

The WebDOMNode class represents a DOM node.

Properties

Node.ELEMENT_NODE
Constant representing an element node in the DOM.
Node.ATTRIBUTE_NODE
Constant representing an attribute node in the DOM.
Node.TEXT_NODE
Constant representing a text node in the DOM.
Node.CDATA_SECTION_NODE
Constant representing a CDATA section node in the DOM.
Node.ENTITY_REFERENCE_NODE
Constant representing an entity reference node in the DOM.
Node.ENTITY_NODE
Constant representing an entity node in the DOM.
Node.PROCESSING_INSTRUCTION_NODE
Constant representing a processing instruction node in the DOM.
Node.COMMENT_NODE
Constant representing a comment node in the DOM.
Node.DOCUMENT_NODE
Constant representing a document node in the DOM.
Node.DOCUMENT_TYPE_NODE
Constant representing a document type node in the DOM.
Node.DOCUMENT_FRAGMENT_NODE
Constant representing a document fragment node in the DOM.
Node.NOTATION_NODE
Constant representing a notation node in the DOM.

Methods

WebDOMNode.appendChild
Appends a child node to this node.
WebDOMNode.cloneNode
Clones this node.
WebDOMNode.getAttributes
Gets the attributes of this node.
WebDOMNode.getChildNodes
Gets the child nodes of this node.
WebDOMNode.getFirstChild
Gets the first child node of this node.
WebDOMNode.getLastChild
Gets the last child node of this node.
WebDOMNode.getLocalName
Returns the local name
WebDOMNode.getNamespaceURI
Returns the namespace URI
WebDOMNode.getNextSibling
Gets the next sibling node of this node.
WebDOMNode.getNodeName
Gets the name of this node.
WebDOMNode.getNodeType
Gets the type of this node.
WebDOMNode.getNodeValue
Gets the value of this node.
WebDOMNode.getOwnerDocument
Gets the document to which the node belongs.
WebDOMNode.getParentNode
Gets the parent node of this node.
WebDOMNode.getPrefix
Returns the prefix
WebDOMNode.getPreviousSibling
Gets the previous sibling node of this node.
WebDOMNode.hasAttributes
Returns true if this node has attributes, and false otherwise.
WebDOMNode.hasChildNodes
Returns true if this node has child nodes, and false otherwise.
WebDOMNode.insertBefore
Inserts a child node before another child node within this node's children.
WebDOMNode.isSupported
Determines if a feature in a particular version is supported.
WebDOMNode.normalize
Removes all empty text nodes and consolidates adjacent text nodes into a single node.
WebDOMNode.removeChild
Removes a child node from this node.
WebDOMNode.replaceChild
Replaces a child node of this node with another node.
WebDOMNode.setNodeValue
Sets the value of this node.
WebDOMNode.setPrefix
Sets the prefix

WebDOMNode.appendChild

WebDOMNode.appendChild(new_child : WebDOMNode) : WebDOMNode

Description

Appends a node to the list of children nodes.

WebDOMNode.cloneNode

WebDOMNode.cloneNode(deep : Boolean) : WebDOMNode

Arguments

deep
If deep is true, all of this node's children are also cloned; if deep is false, only this node is cloned and the child nodes are not copied.

Returns

The newly cloned node.

Description

Clones this node and returns it. If deep is true, all of this node's children are also cloned; if deep is false, only this node is cloned, and the child nodes are not copied.

WebDOMNode.getAttributes

WebDOMNode.getAttributes() : Array(WebDOMAttr)

Returns

An array of attributes.

Description

Returns an array of attributes.

WebDOMNode.getChildNodes

WebDOMNode.getChildNodes() : Array(WebDOMNode)

Returns

The children of this node as an array of WebDOMNode objects.

Description

Returns the children of this node as an array of WebDOMNode objects.

WebDOMNode.getFirstChild

WebDOMNode.getFirstChild() : WebDOMNode

Returns

The first child node of this node as a WebDOMNode object.

Description

Returns the first child node of this node as a WebDOMNode object.

WebDOMNode.getLastChild

WebDOMNode.getLastChild() : WebDOMNode

Returns

The last child node of this node as a WebDOMNode object.

Description

Returns the last child node of this node as a WebDOMNode object.

WebDOMNode.getLocalName

WebDOMNode.getLocalName : String

Returns

The local name.

Description

Returns the local name.

WebDOMNode.getNamespaceURI

WebDOMNode.getNamespaceURI() : String

Returns

The namespace URI.

Description

Returns the namespace URI.

WebDOMNode.getNextSibling

WebDOMNode.getNextSibling() : WebDOMNode

Returns

The next sibling node of this node as a WebDOMNode object.

Description

Returns the next sibling node of this node as a WebDOMNode object.

WebDOMNode.getNodeName

WebDOMNode.getNodeName() : String

Returns

Returns the name of this node.

Description

Returns the name of this node.

WebDOMNode.getNodeType

WebDOMNode.getNodeType() : Integer

Returns

Returns the type of this node.

Description

Returns the type of this node.

WebDOMNode.getNodeValue

WebDOMNode.getNodeValue() : String

Returns

Returns the value of this node.

Description

Returns the value of this node.

WebDOMNode.getOwnerDocument

WebDOMNode.getOwnerDocument() : wxDOMDocument

Returns

A WebDOMDocument object that represents the document to which the node belongs.

Description

Returns a WebDOMDocument object that represents the document to which the node belongs.

WebDOMNode.getParentNode

WebDOMNode.getParentNode() : WebDOMNode

Returns

The parent node of this node as a WebDOMNode object.

Description

Returns the parent node of this node as a WebDOMNode object.

WebDOMNode.getPrefix

WebDOMNode.getPrefix() : String

Returns

The prefix.

Description

Returns the prefix.

WebDOMNode.getPreviousSibling

WebDOMNode.getPreviousSibling() : WebDOMNode

Returns

The previous sibling node of this node as a WebDOMNode object.

Description

Returns the previous sibling node of this node as a WebDOMNode object.

WebDOMNode.hasAttributes

WebDOMNode.hasAttributes() : Boolean

Returns

Returns true if this node has attributes, and false otherwise.

Description

Returns true if this node has attributes, and false otherwise.

WebDOMNode.hasChildNodes

WebDOMNode.hasChildNodes() : Boolean

Returns

Returns true if this node has child nodes, and false otherwise.

Description

Returns true if this node has child nodes, and false otherwise.

WebDOMNode.insertBefore

WebDOMNode.insertBefore(new_child : WebDOMNode, ref_child : WebDOMNode) : WebDOMNode

Arguments

new_child
The node to insert.
ref_child
The node before which to insert the new_child node.

Returns

The newly inserted node.

Description

Inserts a new_child node before another ref_child node within this node's children, and returns the newly inserted node as a WebDOMNode object. If ref_child is null, the new_child is inserted as the last object of this node.

WebDOMNode.isSupported

WebDOMNode.isSupported(feature : String, version : String) : Boolean

Arguments

feature
The feature to check.
version
The version to check.

Description

Returns true if a feature is supported in a particular version, and false otherwise.

WebDOMNode.normalize

WebDOMNode.normalize()

Description

Removes all empty text child nodes from this node and consolidates adjacent text child nodes into a single node.

WebDOMNode.removeChild

WebDOMNode.removeChild(old_child : WebDOMNode) : WebDOMNode

Arguments

old_child
The child node to remove.

Returns

The child node which was removed.

Description

Removes the old_child node from this node, and returns the newly removed node.

WebDOMNode.replaceChild

WebDOMNode.replaceChild(new_child : WebDOMNode, old_child : WebDOMNode) : WebDOMNode

Arguments

new_child
The new node with which to replace the old node.
old_child
The old node which is to be replaced.

Returns

The node which was replaced.

Description

Replaces the old_child node with the new_child node, and returns the old_child node which was replaced.

WebDOMNode.setNodeValue

WebDOMNode.getNodeValue(text : String)

Arguments

value
The text to which to set the value of this node.

Description

Sets the value of this node to the specified text.

WebDOMNode.setPrefix

WebDOMNode.setPrefix(value : String)

Arguments

value
The value to which to set the prefix.

Description

Sets the prefix.