Java Reference
In-Depth Information
Property Name
Description
Introduced
nodeType
An integer representing the type of this node. See previous
table.
Level 1
nodeValue
Gets the value of this node, depending on the type.
Level 1
ownerDocument
Gets the Document object this node is contained in. If this
node is a Document node, it returns null .
Level 1
parentNode
Gets the parent node of this node. Returns null for nodes
that are currently not in the DOM tree.
Level 1
prefix
Returns the namespace prefi x of this node, or null if not
specifi ed.
Level 2
previousSibling
Gets the node immediately before this node. Returns null if
no previous sibling.
Level 1
Methods
Method Name
Description
Introduced
appendChild(newChild)
Adds the newChild to the end of the list of
children.
Level 1
cloneNode(deep)
Returns a duplicate of the node. The returned
node has no parent. If deep is true , this clones all
nodes contained within the node.
Level 1
hasAttributes()
Returns a Boolean value based on if the node has
any attributes (if the node is an element).
Level 2
hasChildNodes()
Returns a Boolean value based on whether the
node has any child nodes.
Level 1
insertBefore(newChild,
refChild)
Inserts the newChild node before the existing
child referenced by refChild. If refChild is
null, newChild is added at the end of the list of
children.
Level 1
removeChild(oldChild)
Removes the specifi ed child node and returns it.
Level 1
replaceChild(newChild,
oldChild)
Replaces oldChild with newChild and returns
oldChild.
Level 1
NodeList
The NodeList object is an ordered collection of nodes. The items contained in the NodeList are acces-
sible via an index starting from 0.
Search WWH ::




Custom Search