public class XMLEntity extends XMLNSNode implements Entity, java.io.Externalizable
Entity
interface and represents an XML internal or external entity as defined in the XML Document Type Definition (DTD).ATTRDECL, Auto_Events, capturing, DOMAttrModified, DOMCharacterDataModified, DOMNodeInserted, DOMNodeInsertedIntoDocument, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMSubtreeModified, ELEMENTDECL, KEPT_NODE, NAMESPACE_NODE, noncapturing, RANGE_DELETE_EVENT, RANGE_DELETETEXT_EVENT, RANGE_INSERT_EVENT, RANGE_INSERTTEXT_EVENT, RANGE_REPLACE_EVENT, RANGE_SETTEXT_EVENT, SCHEMA_NILLED, TRAVERSAL_DELETE_EVENT, TRAVERSAL_REPLACE_EVENT, XMLDECL_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
VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF
Constructor and Description |
---|
XMLEntity()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Node |
getFirstChild()
Gets the first child of this node.
|
Node |
getLastChild()
Gets the last child of this node.
|
Node |
getNextSibling()
Gets The node immediately following this node.
|
java.lang.String |
getNodeName()
Gets the name of this node, depending on its type
|
short |
getNodeType()
Gets a code representing the type of the underlying object
|
java.lang.String |
getNodeValue()
Gets the value of this node, depending on its type
|
java.lang.String |
getNotationName()
For unparsed entities, gets the name of the notation for the entity.
|
Node |
getParentNode()
Gets the parent of this node.
|
Node |
getPreviousSibling()
Gets the node immediately preceding this node.
|
java.lang.String |
getPublicId()
Gets the public identifier associated with the entity, if specified.
|
java.lang.String |
getSystemId()
Gets the system identifier associated with the entity, if specified.
|
void |
readExternal(java.io.ObjectInput inArg)
This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
|
void |
setNodeValue(java.lang.String arg)
Sets the value of entity.
|
void |
writeExternal(java.io.ObjectOutput outArg)
This method saves the state of the object by creating a binary compressed stream with information about this object.
|
addText, addText, appendChild, getChildNodes, getText, insertBefore, normalize, removeChild, replaceChild
addEventListener, canAppendChild, canInsertBefore, canRemoveChild, canReplaceChild, cloneNode, dispatchEvent, equals, getAttributes, getColumnNumber, getDebugMode, getDefaultValue, getEnumeratedValues, getFirstChildAsOffset, getLineNumber, getLocalName, getNamespaceURI, getNextSiblingAsOffset, getNodeValueAsBinaryStream, getNodeValueAsBinaryStream, getNodeValueAsCharacterStream, getNodeValueAsCharacterStream, getOwnerDocument, getPrefix, getPrimitiveTypeId, getProperty, getXMLError, hasAttributes, hasChildNodes, hashCode, isDocumentFlag, isNodeFlag, isSupported, nodeValidity, print, print, print, print, removeEventListener, reportSAXEvents, resetNodeFlag, selectNodes, selectNodes, selectSingleNode, selectSingleNode, setDebugInfo, setNodeFlag, setNodeFlag, setNodeFlag, setNodeValueAsBinaryStream, setNodeValueAsBinaryStream, setNodeValueAsCharacterStream, setNodeValueAsCharacterStream, setPrefix, setProperty, transformNode, valueOf, valueOf, xdbGetNodeId
getClass, notify, notifyAll, toString, wait, wait, wait
appendChild, cloneNode, getAttributes, getChildNodes, getLocalName, getNamespaceURI, getOwnerDocument, getPrefix, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix
public XMLEntity()
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class XMLNode
public java.lang.String getNodeName()
getNodeName
in interface Node
getNodeName
in class XMLNode
public java.lang.String getNodeValue() throws DOMException
getNodeValue
in interface Node
getNodeValue
in class XMLNode
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString
variable on the implementation platform.public java.lang.String getPublicId()
null
.getPublicId
in interface Entity
public java.lang.String getSystemId()
null
.getSystemId
in interface Entity
getSystemId
in class XMLNode
public java.lang.String getNotationName()
null
.getNotationName
in interface Entity
public Node getParentNode()
Document
, DocumentFragment
, and Attr
may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null
.getParentNode
in interface Node
getParentNode
in class XMLNode
public Node getPreviousSibling()
null
.getPreviousSibling
in interface Node
getPreviousSibling
in class XMLNode
public Node getNextSibling()
null
.getNextSibling
in interface Node
getNextSibling
in class XMLNode
public void setNodeValue(java.lang.String arg)
setNodeValue
in interface Node
setNodeValue
in class XMLNode
arg
- The new value of the entity.public void writeExternal(java.io.ObjectOutput outArg) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class XMLNode
outArg
- The ObjectOutput stream used to write the serialized/ compressed stream.java.io.IOException
- is thrown when there is an exception while writing the serialized/compressed stream.public void readExternal(java.io.ObjectInput inArg) throws java.io.IOException, java.lang.ClassNotFoundException, java.io.EOFException
readExternal
in interface java.io.Externalizable
readExternal
in class XMLNode
inArg
- the ObjectInput stream used for reading the compressed stream.java.io.IOException
- is thrown when there is an error in reading the input stream.java.lang.ClassNotFoundException
- is thrown when the class is not found.java.io.EOFException
- is thrown when End of File is encountered.public Node getFirstChild()
null
.getFirstChild
in interface Node
getFirstChild
in class XMLNSNode
public Node getLastChild()
null
.getLastChild
in interface Node
getLastChild
in class XMLNSNode