Class Overview
This interface represents an entity, either parsed or unparsed, in an XML
document. Note that this models the entity itself not the entity
declaration. Entity
declaration modeling has been left for a
later Level of the DOM specification.
The nodeName
attribute that is inherited from
Node
contains the name of the entity.
An XML processor may choose to completely expand entities before the
structure model is passed to the DOM; in this case there will be no
EntityReference
nodes in the document tree.
XML does not mandate that a non-validating XML processor read and
process entity declarations made in the external subset or declared in
external parameter entities. This means that parsed entities declared in
the external subset need not be expanded by some classes of applications,
and that the replacement value of the entity may not be available. When
the replacement value is available, the corresponding Entity
node's child list represents the structure of that replacement text.
Otherwise, the child list is empty.
The DOM Level 2 does not support editing Entity
nodes; if a
user wants to make changes to the contents of an Entity
,
every related EntityReference
node has to be replaced in the
structure model by a clone of the Entity
's contents, and
then the desired changes must be made to each of those clones instead.
Entity
nodes and all their descendants are readonly.
An Entity
node does not have any parent.If the entity
contains an unbound namespace prefix, the namespaceURI
of
the corresponding node in the Entity
node subtree is
null
. The same is true for EntityReference
nodes that refer to this entity, when they are created using the
createEntityReference
method of the Document
interface. The DOM Level 2 does not support any mechanism to resolve
namespace prefixes.
See also the Document Object Model (DOM) Level 2 Core Specification.
Summary
Public Methods |
abstract
String
|
getNotationName()
For unparsed entities, the name of the notation for the entity.
|
abstract
String
|
getPublicId()
The public identifier associated with the entity, if specified.
|
abstract
String
|
getSystemId()
The system identifier associated with the entity, if specified.
|
[Expand]
Inherited Methods |
From interface org.w3c.dom.Node
abstract
Node
|
appendChild(Node newChild)
Adds the node newChild to the end of the list of children
of this node.
|
abstract
Node
|
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes.
|
abstract
NamedNodeMap
|
getAttributes()
A NamedNodeMap containing the attributes of this node (if
it is an Element ) or null otherwise.
|
abstract
NodeList
|
getChildNodes()
A NodeList that contains all children of this node.
|
abstract
Node
|
getFirstChild()
The first child of this node.
|
abstract
Node
|
getLastChild()
The last child of this node.
|
abstract
String
|
getLocalName()
Returns the local part of the qualified name of this node.
|
abstract
String
|
getNamespaceURI()
The namespace URI of this node, or null if it is
unspecified.
|
abstract
Node
|
getNextSibling()
The node immediately following this node.
|
abstract
String
|
getNodeName()
The name of this node, depending on its type; see the table above.
|
abstract
short
|
getNodeType()
A code representing the type of the underlying object, as defined above.
|
abstract
String
|
getNodeValue()
Returns the value of this node, depending on its type; see the table
above.
|
abstract
Document
|
getOwnerDocument()
The Document object associated with this node.
|
abstract
Node
|
getParentNode()
The parent of this node.
|
abstract
String
|
getPrefix()
Returns the namespace prefix of this node, or null if it is
unspecified.
|
abstract
Node
|
getPreviousSibling()
The node immediately preceding this node.
|
abstract
boolean
|
hasAttributes()
Returns whether this node (if it is an element) has any attributes.
|
abstract
boolean
|
hasChildNodes()
Returns whether this node has any children.
|
abstract
Node
|
insertBefore(Node newChild, Node refChild)
Inserts the node newChild before the existing child node
refChild .
|
abstract
boolean
|
isSupported(String feature, String version)
Tests whether the DOM implementation implements a specific feature and
that feature is supported by this node.
|
abstract
void
|
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 adjacent
Text nodes nor empty Text nodes.
|
abstract
Node
|
removeChild(Node oldChild)
Removes the child node indicated by oldChild from the list
of children, and returns it.
|
abstract
Node
|
replaceChild(Node newChild, Node oldChild)
Replaces the child node oldChild with newChild
in the list of children, and returns the oldChild node.
|
abstract
void
|
setNodeValue(String nodeValue)
Sets the value of this node, depending on its type; see the table above.
|
abstract
void
|
setPrefix(String prefix)
Sets the namespace prefix of this node.
|
|
Public Methods
public
abstract
String
getNotationName
()
For unparsed entities, the name of the notation for the entity. For
parsed entities, this is null
.
Returns
- the notation name of the entity or
null
, if the
entity is parsed.
public
abstract
String
getPublicId
()
The public identifier associated with the entity, if specified. If the
public identifier was not specified, this is null
.
Returns
- the public identifier of the entity or
null
, if the
entity does not have a public identifier.
public
abstract
String
getSystemId
()
The system identifier associated with the entity, if specified. If the
system identifier was not specified, this is null
.
Returns
- the system identifier of the entity or
null
, if the
entity does not have a system identifier.