public class XMLDeclPI extends XMLPI implements java.io.Externalizable
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, TRAVERSAL_DELETE_EVENT, TRAVERSAL_REPLACE_EVENT, XMLDECL_NODEATTRIBUTE_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_NODEVAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF| Constructor and Description |
|---|
XMLDeclPI()
Construct a default XMLDecl
|
XMLDeclPI(java.lang.String version,
java.lang.String encoding,
java.lang.String standalone,
boolean textDecl)
Construct a XML Decl using the parameters
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendData(java.lang.String arg)
Append the string to the end of the character data of the node.
|
short |
canAppendData(java.lang.String arg)
Determines if data can be appended.
|
short |
canDeleteData(int offset,
int count)
Determines if data can be deleted.
|
short |
canInsertData(int offset,
java.lang.String arg)
Determines if data can be inserted.
|
short |
canReplaceData(int offset,
int count,
java.lang.String arg)
Determines if data can be replaced.
|
short |
canSetData(java.lang.String arg)
Determines if data can be set.
|
void |
deleteData(int offset,
int count)
Remove a range of characters from the node.
|
java.lang.String |
getData()
Returns the fully constructed string 'version=1.0 ....'
|
java.lang.String |
getEncoding()
Retrieves the character encoding information.
|
int |
getLength()
The number of characters that are available through
data and
the substringData method below. |
java.lang.String |
getNodeValue()
Gets the value of this node
|
java.lang.String |
getStandalone()
Retrieves the standalone information.
|
java.lang.String |
getVersion()
Retrieves the version information.
|
void |
insertData(int offset,
java.lang.String arg)
Insert a string at the specified character offset.
|
short |
isWhitespaceOnly()
Determines if data is only whitespace.
|
short |
nodeValidity(boolean deep,
short wFValidityCheckLevel)
Determines if the node is valid relative to the validation type
specified in
valType. |
void |
replaceData(int offset,
int count,
java.lang.String arg)
Replace the characters starting at the specified character offset with
the specified string.
|
void |
setData(java.lang.String data)
Set the character data of this node
|
void |
setEncoding(java.lang.String encoding)
Sets the character encoding for output.
|
void |
setNodeValue(java.lang.String nodeValue)
The value of this node, depending on its type
overrides method in XMLNode.
|
boolean |
setStandalone(java.lang.String value)
Sets the standalone information stored in the <?
|
void |
setVersion(java.lang.String version)
Sets the version number stored in the <?
|
java.lang.String |
substringData(int offset,
int count)
Extracts a range of data from the node.
|
addText, getNodeName, getNodeType, getTarget, reportSAXEventsaddEventListener, addText, appendChild, canAppendChild, canInsertBefore, canRemoveChild, canReplaceChild, cloneNode, dispatchEvent, equals, getAttributes, getChildNodes, getColumnNumber, getDebugMode, getDefaultValue, getEnumeratedValues, getFirstChild, getFirstChildAsOffset, getLastChild, getLineNumber, getLocalName, getNamespaceURI, getNextSibling, getNextSiblingAsOffset, getNodeValueAsBinaryStream, getNodeValueAsBinaryStream, getNodeValueAsCharacterStream, getNodeValueAsCharacterStream, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getPrimitiveTypeId, getProperty, getSystemId, getText, getXMLError, hasAttributes, hasChildNodes, hashCode, insertBefore, isDocumentFlag, isNodeFlag, isSupported, nodeValidity, normalize, print, print, print, print, readExternal, removeChild, removeEventListener, replaceChild, resetNodeFlag, selectNodes, selectNodes, selectSingleNode, selectSingleNode, setDebugInfo, setNodeFlag, setNodeFlag, setNodeFlag, setNodeValueAsBinaryStream, setNodeValueAsBinaryStream, setNodeValueAsCharacterStream, setNodeValueAsCharacterStream, setPrefix, setProperty, transformNode, valueOf, valueOf, writeExternal, xdbGetNodeIdgetClass, notify, notifyAll, toString, wait, wait, waitsetDataappendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefixcanAppendChild, canInsertBefore, canRemoveChild, canReplaceChild, getDefaultValue, getEnumeratedValues, nodeValiditypublic XMLDeclPI()
public XMLDeclPI(java.lang.String version,
java.lang.String encoding,
java.lang.String standalone,
boolean textDecl)
version - - version of the XMLencoding - - encoding used in the xml declarationstandalone - - standalone value used in the declarationtextDecl - - true => TextDecl, false => XML Declpublic java.lang.String getData()
throws DOMException
getData in interface CharacterDatagetData in interface ProcessingInstructiongetData in class XMLPIDOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public java.lang.String getNodeValue()
throws DOMException
getNodeValue in interface NodeDOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementationpublic final java.lang.String getVersion()
public final void setVersion(java.lang.String version)
version - The version information to set.public final java.lang.String getEncoding()
public final void setEncoding(java.lang.String encoding)
encoding - The character encoding to setpublic final java.lang.String getStandalone()
public final boolean setStandalone(java.lang.String value)
value - The attribute value ('yes' or 'no').public void setData(java.lang.String data)
throws DOMException
setData in interface CharacterDatadata - the character data to be setDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public void setNodeValue(java.lang.String nodeValue)
throws DOMException
setNodeValue in interface NodesetNodeValue in class XMLNodeDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public int getLength()
data and
the substringData method below. This may have the value
zero, i.e., CharacterData nodes may be empty.getLength in interface CharacterDatapublic java.lang.String substringData(int offset,
int count)
throws DOMException
substringData in interface CharacterDataoffset - Start offset of substring to extract.count - The number of characters to extract.offset and
count exceeds the length, then all
characters to the end of the data are returned.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of characters in data, or if the
specified count is negative.
DOMString.public void appendData(java.lang.String arg)
throws DOMException
data provides access to the concatenation of
data and the DOMString specified.appendData in interface CharacterDataarg - The DOMString to append.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.public void insertData(int offset,
java.lang.String arg)
throws DOMException
insertData in interface CharacterDataoffset - The character offset at which to insert.arg - The DOMString to insert.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of characters in data.
public void deleteData(int offset,
int count)
throws DOMException
data and length reflect the change.deleteData in interface CharacterDataoffset - The offset from which to remove characters.count - The number of characters to delete. If the sum of
offset and count exceeds length
then all characters from offset to the end of the data
are deleted.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of characters in data, or if the
specified count is negative.
public void replaceData(int offset,
int count,
java.lang.String arg)
throws DOMException
replaceData in interface CharacterDataoffset - The offset from which to start replacing.count - The number of characters to replace. If the sum of
offset and count exceeds length
, then all characters to the end of the data are replaced (i.e., the
effect is the same as a remove method call with the same
range, followed by an append method invocation).arg - The DOMString with which the range must be
replaced.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of characters in data, or if the
specified count is negative.
public short isWhitespaceOnly()
isWhitespaceOnly in interface CharacterDataEditVALpublic short canSetData(java.lang.String arg)
canSetData in interface CharacterDataEditVALarg - Argument to be set.public short canAppendData(java.lang.String arg)
canAppendData in interface CharacterDataEditVALarg - Data to be appended.public short canReplaceData(int offset,
int count,
java.lang.String arg)
throws DOMException
canReplaceData in interface CharacterDataEditVALoffset - Offset.count - Replacement.arg - Argument to be set.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of 16-bit units in data, or if the specified count
is negative.public short canInsertData(int offset,
java.lang.String arg)
throws DOMException
canInsertData in interface CharacterDataEditVALoffset - Offset.arg - Argument to be set.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of 16-bit units in data.public short canDeleteData(int offset,
int count)
throws DOMException
canDeleteData in interface CharacterDataEditVALoffset - Offset.count - Number of 16-bit units to delete.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of 16-bit units in data, or if the specified count
is negative.public short nodeValidity(boolean deep,
short wFValidityCheckLevel)
valType. This operation doesn't normalize
before checking if it is valid. To do so, one would need to
explicitly call a normalize method. The difference between this
method and the validateDocument method on the
DocumentVAL interface is that
validateDocument only checks to determine whether the
entire document is valid.wFValidityCheckLevel - Flag to tell at what level validity and
well-formedness checking is done.Copyright © 2003, 2025, Oracle and/or its affiliates.