Node
interfacein packageorg.w3c.dom
public interface Node:
Node

Base interface for all DOM tree nodes.

import org.w3c.dom

node as Node = document.documentElement
print(node.nodeName)
Fields
Modifier and Type Member Description
public static readonly ATTRIBUTE_NODE
ATTRIBUTE_NODE as Int = 2
No summary.
public static readonly CDATA_SECTION_NODE
CDATA_SECTION_NODE as Int = 4
No summary.
public static readonly COMMENT_NODE
COMMENT_NODE as Int = 8
No summary.
public static readonly DOCUMENT_FRAGMENT_NODE
DOCUMENT_FRAGMENT_NODE as Int = 11
No summary.
public static readonly DOCUMENT_NODE
DOCUMENT_NODE as Int = 9
No summary.
public static readonly DOCUMENT_POSITION_CONTAINED_BY
DOCUMENT_POSITION_CONTAINED_BY as Int = 16
No summary.
public static readonly DOCUMENT_POSITION_CONTAINS
DOCUMENT_POSITION_CONTAINS as Int = 8
No summary.
public static readonly DOCUMENT_POSITION_DISCONNECTED
DOCUMENT_POSITION_DISCONNECTED as Int = 1
Bit-mask values returned by compareDocumentPosition.
public static readonly DOCUMENT_POSITION_FOLLOWING
DOCUMENT_POSITION_FOLLOWING as Int = 4
No summary.
public static readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC as Int = 32
No summary.
public static readonly DOCUMENT_POSITION_PRECEDING
DOCUMENT_POSITION_PRECEDING as Int = 2
No summary.
public static readonly DOCUMENT_TYPE_NODE
DOCUMENT_TYPE_NODE as Int = 10
No summary.
public static readonly ELEMENT_NODE
ELEMENT_NODE as Int = 1
Numeric node type constants defined by DOM Core.
public static readonly ENTITY_NODE
ENTITY_NODE as Int = 6
No summary.
public static readonly ENTITY_REFERENCE_NODE
ENTITY_REFERENCE_NODE as Int = 5
No summary.
public static readonly NOTATION_NODE
NOTATION_NODE as Int = 12
No summary.
public static readonly PROCESSING_INSTRUCTION_NODE
PROCESSING_INSTRUCTION_NODE as Int = 7
No summary.
public static readonly TEXT_NODE
TEXT_NODE as Int = 3
No summary.
Properties
Modifier and Type Member Description
public readonly property attributes
attributes as NamedNodeMap
Attributes map for element nodes, or null.
public readonly property baseURI
baseURI as String
Base URI associated with this node.
public readonly property childNodes
childNodes as NodeList
Ordered child node list.
public readonly property firstChild
firstChild as Node
First child node, or null.
public readonly property lastChild
lastChild as Node
Last child node, or null.
public readonly property localName
localName as String
Local name of this node.
public readonly property namespaceURI
namespaceURI as String
Namespace URI of this node, or null.
public readonly property nextSibling
nextSibling as Node
Next sibling node, or null.
public readonly property nodeName
nodeName as String
Qualified name of this node.
public readonly property nodeType
nodeType as Int
Numeric node type.
public property nodeValue
nodeValue as String
Node value, when the node kind carries a scalar value.
public readonly property ownerDocument
ownerDocument as Document
Owner document of this node.
public readonly property parentNode
parentNode as Node
Parent node, or null for detached/root nodes.
public property prefix
prefix as String
Namespace prefix of this node.
public readonly property previousSibling
previousSibling as Node
Previous sibling node, or null.
public property textContent
textContent as String
Concatenated text content of this node.
Methods
Modifier and Type Member Description
public appendChild
appendChild(newChild as Node) as Node throws DOMException
Appends a child node.
public cloneNode
cloneNode(deep as Boolean) as Node
Clones this node.
public compareDocumentPosition
compareDocumentPosition(other as Node) as Int throws DOMException
Compares document order with another node.
public getAttribute
getAttribute(name as String) as String
Returns an element attribute value when this node is an element.
public getFeature
getFeature(feature as String, version as String) as Object
Returns a specialized feature object when available.
public getUserData
getUserData(key as String) as Object
Returns application data associated with this node.
public hasAttributes
hasAttributes() as Boolean
Indicates whether this node has attributes.
public hasChildNodes
hasChildNodes() as Boolean
Indicates whether this node has children.
public insertBefore
insertBefore(newChild as Node, refChild as Node) as Node throws DOMException
Inserts a node before a reference child.
public isDefaultNamespace
isDefaultNamespace(namespaceURI as String) as Boolean
Indicates whether the namespace URI is the default namespace.
public isEqualNode
isEqualNode(arg as Node) as Boolean
Tests structural equality with another node.
public isSameNode
isSameNode(other as Node) as Boolean
Tests object identity with another node.
public isSupported
isSupported(feature as String, version as String) as Boolean
Indicates whether a DOM feature is supported.
public lookupNamespaceURI
lookupNamespaceURI(prefix as String) as String
Resolves a namespace URI for a prefix.
public lookupPrefix
lookupPrefix(namespaceURI as String) as String
Resolves a prefix for a namespace URI.
public normalize
normalize() as Void
Normalizes adjacent text nodes in this subtree.
public removeChild
removeChild(oldChild as Node) as Node throws DOMException
Removes a child node.
public replaceChild
replaceChild(newChild as Node, oldChild as Node) as Node throws DOMException
Replaces one child node by another.
public setUserData
setUserData(key as String, data as Object, handler as UserDataHandler) as Object
Associates application data with this node.