public class NodeImpl extends DefaultNode
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
NodeImpl() |
NodeImpl(java.lang.String prefix,
java.lang.String localpart,
java.lang.String rawname,
java.lang.String uri,
short nodeType) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLocalName()
Returns the local part of the qualified name of this node.
|
java.lang.String |
getNamespaceURI()
The namespace URI of this node, or
null if it is
unspecified (see ). |
java.lang.String |
getNodeName()
The name of this node, depending on its type; see the table above.
|
short |
getNodeType()
A code representing the type of the underlying object, as defined above.
|
java.lang.String |
getPrefix()
The namespace prefix of this node, or
null if it is
unspecified. |
boolean |
getReadOnly() |
void |
setReadOnly(boolean hide,
boolean deep) |
java.lang.String |
toString()
NON-DOM method for debugging convenience.
|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public NodeImpl()
public NodeImpl(java.lang.String prefix, java.lang.String localpart, java.lang.String rawname, java.lang.String uri, short nodeType)
public java.lang.String getNodeName()
org.w3c.dom.Node
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class DefaultNode
public java.lang.String getNamespaceURI()
org.w3c.dom.Node
null
if it is
unspecified (see ).
ELEMENT_NODE
and
ATTRIBUTE_NODE
and nodes created with a DOM Level 1
method, such as Document.createElement()
, this is always
null
.
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.
getNamespaceURI
in interface org.w3c.dom.Node
getNamespaceURI
in class DefaultNode
public java.lang.String getPrefix()
org.w3c.dom.Node
null
if it is
unspecified. When it is defined to be null
, setting it
has no effect, including if the node is read-only.
nodeName
attribute, which holds the qualified name, as
well as the tagName
and name
attributes of
the Element
and Attr
interfaces, when
applicable.
null
makes it unspecified,
setting it to an empty string is implementation dependent.
namespaceURI
and localName
do not change.
ELEMENT_NODE
and
ATTRIBUTE_NODE
and nodes created with a DOM Level 1
method, such as createElement
from the
Document
interface, this is always null
.getPrefix
in interface org.w3c.dom.Node
getPrefix
in class DefaultNode
public java.lang.String getLocalName()
org.w3c.dom.Node
ELEMENT_NODE
and
ATTRIBUTE_NODE
and nodes created with a DOM Level 1
method, such as Document.createElement()
, this is always
null
.getLocalName
in interface org.w3c.dom.Node
getLocalName
in class DefaultNode
public short getNodeType()
org.w3c.dom.Node
getNodeType
in interface org.w3c.dom.Node
getNodeType
in class DefaultNode
public void setReadOnly(boolean hide, boolean deep)
public boolean getReadOnly()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.