Node (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[appendChild](../../../org/w3c/dom/Node.html#appendChild-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") newChild)

Adds the node newChild to the end of the list of children of this node.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[cloneNode](../../../org/w3c/dom/Node.html#cloneNode-boolean-)(boolean deep)

Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.

short

[compareDocumentPosition](../../../org/w3c/dom/Node.html#compareDocumentPosition-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") other)

Compares the reference node, i.e.

[NamedNodeMap](../../../org/w3c/dom/NamedNodeMap.html "interface in org.w3c.dom")

[getAttributes](../../../org/w3c/dom/Node.html#getAttributes--)()

A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

[String](../../../java/lang/String.html "class in java.lang")

[getBaseURI](../../../org/w3c/dom/Node.html#getBaseURI--)()

The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.

[NodeList](../../../org/w3c/dom/NodeList.html "interface in org.w3c.dom")

[getChildNodes](../../../org/w3c/dom/Node.html#getChildNodes--)()

A NodeList that contains all children of this node.

[Object](../../../java/lang/Object.html "class in java.lang")

[getFeature](../../../org/w3c/dom/Node.html#getFeature-java.lang.String-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") feature,[String](../../../java/lang/String.html "class in java.lang") version)

This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in .

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[getFirstChild](../../../org/w3c/dom/Node.html#getFirstChild--)()

The first child of this node.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[getLastChild](../../../org/w3c/dom/Node.html#getLastChild--)()

The last child of this node.

[String](../../../java/lang/String.html "class in java.lang")

[getLocalName](../../../org/w3c/dom/Node.html#getLocalName--)()

Returns the local part of the qualified name of this node.

[String](../../../java/lang/String.html "class in java.lang")

[getNamespaceURI](../../../org/w3c/dom/Node.html#getNamespaceURI--)()

The namespace URI of this node, or null if it is unspecified (see ).

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[getNextSibling](../../../org/w3c/dom/Node.html#getNextSibling--)()

The node immediately following this node.

[String](../../../java/lang/String.html "class in java.lang")

[getNodeName](../../../org/w3c/dom/Node.html#getNodeName--)()

The name of this node, depending on its type; see the table above.

short

[getNodeType](../../../org/w3c/dom/Node.html#getNodeType--)()

A code representing the type of the underlying object, as defined above.

[String](../../../java/lang/String.html "class in java.lang")

[getNodeValue](../../../org/w3c/dom/Node.html#getNodeValue--)()

The value of this node, depending on its type; see the table above.

[Document](../../../org/w3c/dom/Document.html "interface in org.w3c.dom")

[getOwnerDocument](../../../org/w3c/dom/Node.html#getOwnerDocument--)()

The Document object associated with this node.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[getParentNode](../../../org/w3c/dom/Node.html#getParentNode--)()

The parent of this node.

[String](../../../java/lang/String.html "class in java.lang")

[getPrefix](../../../org/w3c/dom/Node.html#getPrefix--)()

The namespace prefix of this node, or null if it is unspecified.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[getPreviousSibling](../../../org/w3c/dom/Node.html#getPreviousSibling--)()

The node immediately preceding this node.

[String](../../../java/lang/String.html "class in java.lang")

[getTextContent](../../../org/w3c/dom/Node.html#getTextContent--)()

This attribute returns the text content of this node and its descendants.

[Object](../../../java/lang/Object.html "class in java.lang")

[getUserData](../../../org/w3c/dom/Node.html#getUserData-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") key)

Retrieves the object associated to a key on a this node.

boolean

[hasAttributes](../../../org/w3c/dom/Node.html#hasAttributes--)()

Returns whether this node (if it is an element) has any attributes.

boolean

[hasChildNodes](../../../org/w3c/dom/Node.html#hasChildNodes--)()

Returns whether this node has any children.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[insertBefore](../../../org/w3c/dom/Node.html#insertBefore-org.w3c.dom.Node-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") newChild,[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") refChild)

Inserts the node newChild before the existing child noderefChild.

boolean

[isDefaultNamespace](../../../org/w3c/dom/Node.html#isDefaultNamespace-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") namespaceURI)

This method checks if the specified namespaceURI is the default namespace or not.

boolean

[isEqualNode](../../../org/w3c/dom/Node.html#isEqualNode-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") arg)

Tests whether two nodes are equal.

boolean

[isSameNode](../../../org/w3c/dom/Node.html#isSameNode-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") other)

Returns whether this node is the same node as the given one.

boolean

[isSupported](../../../org/w3c/dom/Node.html#isSupported-java.lang.String-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") feature,[String](../../../java/lang/String.html "class in java.lang") version)

Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in .

[String](../../../java/lang/String.html "class in java.lang")

[lookupNamespaceURI](../../../org/w3c/dom/Node.html#lookupNamespaceURI-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") prefix)

Look up the namespace URI associated to the given prefix, starting from this node.

[String](../../../java/lang/String.html "class in java.lang")

[lookupPrefix](../../../org/w3c/dom/Node.html#lookupPrefix-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") namespaceURI)

Look up the prefix associated to the given namespace URI, starting from this node.

void

[normalize](../../../org/w3c/dom/Node.html#normalize--)()

Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacentText nodes nor empty Text nodes.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[removeChild](../../../org/w3c/dom/Node.html#removeChild-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") oldChild)

Removes the child node indicated by oldChild from the list of children, and returns it.

[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")

[replaceChild](../../../org/w3c/dom/Node.html#replaceChild-org.w3c.dom.Node-org.w3c.dom.Node-)([Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") newChild,[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") oldChild)

Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.

void

[setNodeValue](../../../org/w3c/dom/Node.html#setNodeValue-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") nodeValue)

The value of this node, depending on its type; see the table above.

void

[setPrefix](../../../org/w3c/dom/Node.html#setPrefix-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") prefix)

The namespace prefix of this node, or null if it is unspecified.

void

[setTextContent](../../../org/w3c/dom/Node.html#setTextContent-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") textContent)

This attribute returns the text content of this node and its descendants.

[Object](../../../java/lang/Object.html "class in java.lang")

[setUserData](../../../org/w3c/dom/Node.html#setUserData-java.lang.String-java.lang.Object-org.w3c.dom.UserDataHandler-)([String](../../../java/lang/String.html "class in java.lang") key,[Object](../../../java/lang/Object.html "class in java.lang") data,[UserDataHandler](../../../org/w3c/dom/UserDataHandler.html "interface in org.w3c.dom") handler)

Associate an object to a key on this node.