Node (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")
**[appendChild](../../../org/w3c/dom/Node.html#appendChild%28org.w3c.dom.Node%29)**([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%28boolean%29)**(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%28org.w3c.dom.Node%29)**([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%28%29)**()
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%28%29)**()
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%28%29)**()
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%28java.lang.String,%20java.lang.String%29)**([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%28%29)**()
The first child of this node.
[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom")
**[getLastChild](../../../org/w3c/dom/Node.html#getLastChild%28%29)**()
The last child of this node.
[String](../../../java/lang/String.html "class in java.lang")
**[getLocalName](../../../org/w3c/dom/Node.html#getLocalName%28%29)**()
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%28%29)**()
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%28%29)**()
The node immediately following this node.
[String](../../../java/lang/String.html "class in java.lang")
**[getNodeName](../../../org/w3c/dom/Node.html#getNodeName%28%29)**()
The name of this node, depending on its type; see the table above.
short
**[getNodeType](../../../org/w3c/dom/Node.html#getNodeType%28%29)**()
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%28%29)**()
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%28%29)**()
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%28%29)**()
The parent of this node.
[String](../../../java/lang/String.html "class in java.lang")
**[getPrefix](../../../org/w3c/dom/Node.html#getPrefix%28%29)**()
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%28%29)**()
The node immediately preceding this node.
[String](../../../java/lang/String.html "class in java.lang")
**[getTextContent](../../../org/w3c/dom/Node.html#getTextContent%28%29)**()
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%28java.lang.String%29)**([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%28%29)**()
Returns whether this node (if it is an element) has any attributes.
boolean
**[hasChildNodes](../../../org/w3c/dom/Node.html#hasChildNodes%28%29)**()
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%28org.w3c.dom.Node,%20org.w3c.dom.Node%29)**([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%28java.lang.String%29)**([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%28org.w3c.dom.Node%29)**([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%28org.w3c.dom.Node%29)**([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%28java.lang.String,%20java.lang.String%29)**([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%28java.lang.String%29)**([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%28java.lang.String%29)**([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%28%29)**()
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%28org.w3c.dom.Node%29)**([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%28org.w3c.dom.Node,%20org.w3c.dom.Node%29)**([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%28java.lang.String%29)**([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%28java.lang.String%29)**([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%28java.lang.String%29)**([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%28java.lang.String,%20java.lang.Object,%20org.w3c.dom.UserDataHandler%29)**([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.