Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public Node | appendChild(Node
The node to add.If it is a
newChild)DocumentFragment object, the entire contents of the
document fragment are moved into the child list of this nodeImplements org. Adds the node |
public Node | cloneNode(boolean
If deep)true , recursively clone the subtree under
the specified node; if false , clone only the node
itself (and its attributes, if it is an Element ).Implements org. Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
public short | compareDocumentPosition(Node
The node to compare against the reference node. other)Implements org. Compares the reference node, i.e. the node on which this method is being called, with a node, i.e. the one passed as a parameter, with regard to their position in the document and according to the document order. |
public NamedNodeMap | getAttributes()
Implements org. A |
public String | |
public NodeList | getChildNodes()
Implements org. A |
public Object | getFeature(String
The name of the feature requested. Note that any plus
sign "+" prepended to the name of the feature will be ignored since
it is not significant in the context of this method. feature, String This is the version number of the feature to test. version)Implements org. This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in . |
public Node | |
public Node | |
public String | getLocalName()
Implements org. Returns the local part of the qualified name of this node. |
public String | getNamespaceURI()
Implements org. The namespace URI of this node, or |
public Node | getNextSibling()
Implements org. The node immediately following this node. |
public String | getNodeName()
Implements org. The name of this node, depending on its type; see the table above. |
public short | getNodeType()
Implements org. A code representing the type of the underlying object, as defined above. |
public String | getNodeValue()
Implements org. The value of this node, depending on its type; see the table above. |
public Document | getOwnerDocument()
Implements org. The |
public Node | |
public String | getPrefix()
Implements org. The namespace prefix of this node, or |
public Node | getPreviousSibling()
Implements org. The node immediately preceding this node. |
public String | getTextContent()
Implements org. This attribute returns the text content of this node and its descendants. |
public Object | getUserData(String
The key the object is associated to. key)Implements org. Retrieves the object associated to a key on a this node. |
public boolean | hasAttributes()
Implements org. Returns whether this node (if it is an element) has any attributes. |
public boolean | hasChildNodes()
Implements org. Returns whether this node has any children. |
public Node | insertBefore(Node
The node to insert. newChild, Node The reference node, i.e., the node before which the
new node must be inserted. refChild)Implements org. Inserts the node |
public boolean | isDefaultNamespace(String
The namespace URI to look for. namespaceURI)Implements org. This method checks if the specified |
public boolean | isEqualNode(Node
The node to compare equality with. arg)Implements org. Tests whether two nodes are equal. |
public boolean | isSameNode(Node
The node to test against. other)Implements org. Returns whether this node is the same node as the given one. |
public boolean | isSupported(String
The name of the feature to test. feature, String This is the version number of the feature to test. version)Implements org. Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in . |
public String | lookupNamespaceURI(String
The prefix to look for. If this parameter is
prefix)null , the method will return the default namespace URI
if any.Implements org. Look up the namespace URI associated to the given prefix, starting from this node. |
public String | lookupPrefix(String
The namespace URI to look for. namespaceURI)Implements org. Look up the prefix associated to the given namespace URI, starting from this node. |
public void | normalize()
Implements org. Puts all |
public Node | removeChild(Node
The node being removed. oldChild)Implements org. Removes the child node indicated by |
public Node | replaceChild(Node
The new node to put in the child list. newChild, Node The node being replaced in the list. oldChild)Implements org. Replaces the child node |
public void | setNodeValue(String nodeValue)
Implements org. The value of this node, depending on its type; see the table above. |
public void | setPrefix(String prefix)
Implements org. The namespace prefix of this node, or |
public void | setTextContent(String textContent)
Implements org. This attribute returns the text content of this node and its descendants. |
public Object | setUserData(String
The key to associate the object to. key, Object The object to associate to the given key, or
data, UserDataHandler null to remove any existing association to that key.The handler to associate to that key, or
handler)null .Implements org. Associate an object to a key on this node. |
DefaultNode | back to summary |
---|---|
public DefaultNode() |
appendChild | back to summary |
---|---|
public Node appendChild(Node newChild) throws DOMException Implements org. Doc from org. Adds the node
|
cloneNode | back to summary |
---|---|
public Node cloneNode(boolean deep) Implements org. Doc from org. Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes. The duplicate node has no parent (
|
compareDocumentPosition | back to summary |
---|---|
public short compareDocumentPosition(Node other) Implements org. Doc from org. Compares the reference node, i.e. the node on which this method is being called, with a node, i.e. the one passed as a parameter, with regard to their position in the document and according to the document order.
|
getAttributes | back to summary |
---|---|
public NamedNodeMap getAttributes() Implements org. Doc from org. A |
getBaseURI | back to summary |
---|---|
public String getBaseURI() Implements org. DOM Level 3 |
getChildNodes | back to summary |
---|---|
public NodeList getChildNodes() Implements org. Doc from org. A |
getFeature | back to summary |
---|---|
public Object getFeature(String feature, String version) Implements org. Doc from org. This method returns a specialized object which implements the
specialized APIs of the specified feature and version, as specified
in . The specialized object may also be obtained by using
binding-specific casting methods but is not necessarily expected to,
as discussed in . This method also allow the implementation to
provide specialized objects which do not support the
|
getFirstChild | back to summary |
---|---|
public Node getFirstChild() Implements org. Doc from org. The first child of this node. If there is no such node, this returns
|
getLastChild | back to summary |
---|---|
public Node getLastChild() Implements org. Doc from org. The last child of this node. If there is no such node, this returns
|
getLocalName | back to summary |
---|---|
public String getLocalName() Implements org. Doc from org. Returns the local part of the qualified name of this node.
|
getNamespaceURI | back to summary |
---|---|
public String getNamespaceURI() Implements org. Doc from org. The namespace URI of this node, or Note Per the Namespaces in XML Specification [XML Namespaces] an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace. |
getNextSibling | back to summary |
---|---|
public Node getNextSibling() Implements org. Doc from org. The node immediately following this node. If there is no such node,
this returns |
getNodeName | back to summary |
---|---|
public String getNodeName() Implements org. Doc from org. The name of this node, depending on its type; see the table above. |
getNodeType | back to summary |
---|---|
public short getNodeType() Implements org. Doc from org. A code representing the type of the underlying object, as defined above. |
getNodeValue | back to summary |
---|---|
public String getNodeValue() throws DOMException Implements org. Doc from org. The value of this node, depending on its type; see the table above.
When it is defined to be
|
getOwnerDocument | back to summary |
---|---|
public Document getOwnerDocument() Implements org. Doc from org. The |
getParentNode | back to summary |
---|---|
public Node getParentNode() Implements org. Doc from org. The parent of this node. All nodes, except |
getPrefix | back to summary |
---|---|
public String getPrefix() Implements org. Doc from org. The namespace prefix of this node, or |
getPreviousSibling | back to summary |
---|---|
public Node getPreviousSibling() Implements org. Doc from org. The node immediately preceding this node. If there is no such node,
this returns |
getTextContent | back to summary | ||||||||
---|---|---|---|---|---|---|---|---|---|
public String getTextContent() throws DOMException Implements org. Doc from org. This attribute returns the text content of this node and its
descendants. When it is defined to be
|
getUserData | back to summary |
---|---|
public Object getUserData(String key) Implements org. Doc from org. Retrieves the object associated to a key on a this node. The object
must first have been set to this node by calling
|
hasAttributes | back to summary |
---|---|
public boolean hasAttributes() Implements org. Doc from org. Returns whether this node (if it is an element) has any attributes.
|
hasChildNodes | back to summary |
---|---|
public boolean hasChildNodes() Implements org. Doc from org. Returns whether this node has any children.
|
insertBefore | back to summary |
---|---|
public Node insertBefore(Node newChild, Node refChild) throws DOMException Implements org. Doc from org. Inserts the node Note Inserting a node before itself is implementation dependent.
|
isDefaultNamespace | back to summary |
---|---|
public boolean isDefaultNamespace(String namespaceURI) Implements org. Doc from org. This method checks if the specified
|
isEqualNode | back to summary |
---|---|
public boolean isEqualNode(Node arg) Implements org. Doc from org. Tests whether two nodes are equal.
For two DocumentType nodes to be equal, the following
conditions must also be satisfied:
On the other hand, the following do not affect equality: the ownerDocument , baseURI , and
parentNode attributes, the specified
attribute for Attr nodes, the schemaTypeInfo
attribute for Attr and Element nodes, the
Text.isElementContentWhitespace attribute for
Text nodes, as well as any user data or event listeners
registered on the nodes.Note As a general rule, anything not mentioned in the description above is not significant in consideration of equality checking. Note that future versions of this specification may take into account more attributes and implementations conform to this specification are expected to be updated accordingly.
|
isSameNode | back to summary |
---|---|
public boolean isSameNode(Node other) Implements org. Doc from org. Returns whether this node is the same node as the given one.
|
isSupported | back to summary |
---|---|
public boolean isSupported(String feature, String version) Implements org. Doc from org. Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in . |
lookupNamespaceURI | back to summary |
---|---|
public String lookupNamespaceURI(String prefix) Implements org. Doc from org. Look up the namespace URI associated to the given prefix, starting from
this node.
|
lookupPrefix | back to summary |
---|---|
public String lookupPrefix(String namespaceURI) Implements org. Doc from org. Look up the prefix associated to the given namespace URI, starting from
this node. The default namespace declarations are ignored by this
method.
|
normalize | back to summary |
---|---|
public void normalize() Implements org. Doc from org. Puts all Note In cases where the document contains
|
removeChild | back to summary |
---|---|
public Node removeChild(Node oldChild) throws DOMException Implements org. Doc from org. Removes the child node indicated by
|
replaceChild | back to summary |
---|---|
public Node replaceChild(Node newChild, Node oldChild) throws DOMException Implements org. Doc from org. Replaces the child node Note Replacing a node with itself is implementation dependent.
|
setNodeValue | back to summary |
---|---|
public void setNodeValue(String nodeValue) throws DOMException Implements org. Doc from org. The value of this node, depending on its type; see the table above.
When it is defined to be
|
setPrefix | back to summary |
---|---|
public void setPrefix(String prefix) throws DOMException Implements org. Doc from org. The namespace prefix of this node, or
|
setTextContent | back to summary | ||||||||
---|---|---|---|---|---|---|---|---|---|
public void setTextContent(String textContent) throws DOMException Implements org. Doc from org. This attribute returns the text content of this node and its
descendants. When it is defined to be
|
setUserData | back to summary |
---|---|
public Object setUserData(String key, Object data, UserDataHandler handler) Implements org. Doc from org. Associate an object to a key on this node. The object can later be
retrieved from this node by calling
|