com.teamkonzept.dom4jb.dom
Class NamedNode
java.lang.Object
|
+--com.teamkonzept.dom4jb.dom.NodeList
|
+--com.teamkonzept.dom4jb.dom.Node
|
+--com.teamkonzept.dom4jb.dom.NamedNode
- All Implemented Interfaces:
- Node, NodeList
- Direct Known Subclasses:
- Attribute, Element
- public abstract class NamedNode
- extends Node
Fields inherited from class com.teamkonzept.dom4jb.dom.Node |
document |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Methods inherited from class com.teamkonzept.dom4jb.dom.Node |
accept, appendChild, attach, cloneNode, getAttributes, getChildIndex, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue |
Methods inherited from class com.teamkonzept.dom4jb.dom.NodeList |
add, clear, ensureCapacity, get, getLength, getParentNode, isEmpty, item, setIterator, setParentNode, size, trimToSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamedNode
public NamedNode(Document document,
NodeName name)
- Creates new NamedNode
NamedNode
public NamedNode(Document document,
Node parent,
NodeName name)
- Creates new NamedNode
getNodeName
public String getNodeName()
- The name of this node, depending on its type; see the table above.
setPrefix
public void setPrefix(String prefix)
- The namespace prefix of this node, or
null
if it is
unspecified.
Note that setting this attribute, when permitted, changes the
nodeName
attribute, which holds the qualified name, as
well as the tagName
and name
attributes of
the Element
and Attr
interfaces, when
applicable.
Note also that changing the prefix of an attribute that is known to
have a default value, does not make a new attribute with the default
value and the original prefix appear, since the
namespaceURI
and localName
do not change.
For nodes of any type other than 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
.
- Specified by:
setPrefix
in interface Node
- Overrides:
setPrefix
in class Node
- Since:
- DOM Level 2
getPrefix
public String getPrefix()
- The namespace prefix of this node, or
null
if it is
unspecified.
Note that setting this attribute, when permitted, changes the
nodeName
attribute, which holds the qualified name, as
well as the tagName
and name
attributes of
the Element
and Attr
interfaces, when
applicable.
Note also that changing the prefix of an attribute that is known to
have a default value, does not make a new attribute with the default
value and the original prefix appear, since the
namespaceURI
and localName
do not change.
For nodes of any type other than 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
.
- Specified by:
getPrefix
in interface Node
- Overrides:
getPrefix
in class Node
- Since:
- DOM Level 2
getLocalName
public String getLocalName()
- Returns the local part of the qualified name of this node.
For nodes of any type other than 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
.
- Specified by:
getLocalName
in interface Node
- Overrides:
getLocalName
in class Node
- Since:
- DOM Level 2
getNamespaceURI
public String getNamespaceURI()
- The namespace URI of this node, or
null
if it is
unspecified.
This is not a computed value that is the result of a namespace
lookup based on an examination of the namespace declarations in
scope. It is merely the namespace URI given at creation time.
For nodes of any type other than 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
.Per
the Namespaces in XML Specification 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.
- Specified by:
getNamespaceURI
in interface Node
- Overrides:
getNamespaceURI
in class Node
- Since:
- DOM Level 2
getNamingItem
public NodeName getNamingItem()
Copyright © 2001-2003 Team-Konzept GmbH & CO KG. All Rights Reserved.