Developer Resources

WebDOMDocument

Overview

The WebDOMNode class represents a DOM document.

Base Class

WebDOMNode

Constructor

WebDOMDocument()

Methods

WebDOMDocument.createAttribute
Creates an attribute.
WebDOMDocument.createElement
Creates an element.
WebDOMDocument.createTextNode
Creates a text node.
WebDOMDocument.getDocumentElement
Gets the document element.
WebDOMDocument.getElementById
Gets the element with a particular id from a document.
WebDOMDocument.getElementsByTagName
Gets an array of child elements having the specified tag name.
WebDOMDocument.importNode
Imports a node into this document.

Inherited 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

WebDOMDocument.createAttribute

WebDOMDocument.createAttribute(name : String) : WebDOMAttr

Arguments

tag_name
The tag_name of the attribute to create.

Returns

Returns the newly created attribute.

Description

Creates an attribute.

WebDOMDocument.createElement

WebDOMDocument.createElement(tag_name : String) : WebDOMElement

Arguments

tag_name
The tag_name of the element to create.

Returns

Returns the newly created element.

Description

Creates an element.

WebDOMDocument.createTextNode

WebDOMDocument.createTextNode(name : String) : WebDOMAttr

Arguments

tag_name
The tag_name of the text node to create.

Returns

Returns the newly created text node.

Description

Creates a text node.

WebDOMDocument.getDocumentElement

WebDOMDocument.getDocumentElement() : wxDOMElement

Returns

Returns the document element.

Description

Returns the document element.

WebDOMDocument.getElementById

WebDOMDocument.getElementById(id : String) : WebDOMElement

Arguments

id
The id of the child element to return.

Returns

Returns the element with the specified id from the document.

Description

Returns the element with the specified id from the document.

WebDOMDocument.getElementsByTagName

WebDOMDocument.getElementsByTagName(tag_name : String) : Array(WebDOMElement)

Arguments

tag_name
The tag_name of the child elements that are to be returned.

Returns

Returns an array of all the child elements of this document which have the specified tag name.

Description

Returns an array of all the child elements of this document which have the specified tag name.

WebDOMDocument.importNode

WebDOMDocument.importNode(node : WebDOMNode, deep : Boolean) : WebDOMNode

Arguments

node
A node to import.
deep
Boolean value that specifies whether or not to import all the child nodes of the imported node in addition to the node itself.

Returns

A copy of the imported node.

Description

Imports a node into this document. If the deep parameter is true, then all the child nodes of the imported node are also imported.