|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.parser.v2.XMLNode
oracle.xml.parser.v2.CharData
oracle.xml.parser.v2.XMLPI
This class implements the DOM Processing Instruction interface.
ProcessingInstruction
, NodeFactory
, DOMParser.setNodeFactory(oracle.xml.parser.v2.NodeFactory)
, Serialized FormField Summary |
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 |
Fields inherited from interface org.w3c.dom.validation.NodeEditVAL |
VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF |
Constructor Summary | |
XMLPI() Deprecated. use createProcessingInstruction(String) method of XMLDocument |
|
XMLPI(java.lang.String target, java.lang.String data) Deprecated. see createProcessingInstruction(String) of XMLDocument |
|
protected |
XMLPI(XMLDocument doc) Protected constructor used to create custom DOM Node using XMLDocument as the factory. |
Method Summary | |
XMLNode |
addText(java.lang.String str) Adds text string to the node |
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() Get the character data of this node |
int |
getLength() The number of characters that are available through data and the substringData method below. |
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 |
getTarget() Returns the target of this PI. |
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 |
readExternal(java.io.ObjectInput inArg) This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly. |
void |
replaceData(int offset, int count, java.lang.String arg) Replace the characters starting at the specified character offset with the specified string. |
void |
reportSAXEvents(ContentHandler cntHandler) Report SAX Events from a DOM Tree |
void |
setData(java.lang.String data) Set the character data of this node |
void |
setNodeValue(java.lang.String nodeValue) The value of this node, depending on its type overrides method in XMLNode. |
java.lang.String |
substringData(int offset, int count) Extracts a range of data from the node. |
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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.ProcessingInstruction |
getData, setData |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Methods inherited from interface org.w3c.dom.validation.NodeEditVAL |
canAppendChild, canInsertBefore, canRemoveChild, canReplaceChild, getDefaultValue, getEnumeratedValues, nodeValidity |
Constructor Detail |
public XMLPI()
protected XMLPI(XMLDocument doc)
doc
- - Owner documentpublic XMLPI(java.lang.String target, java.lang.String data)
target
- The target of this PIdata
- The content of this PIMethod Detail |
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 getTarget()
getTarget
in interface ProcessingInstruction
public XMLNode addText(java.lang.String str)
str
- the text string to be addedpublic void reportSAXEvents(ContentHandler cntHandler) throws SAXException
reportSAXEvents
in class XMLNode
cntHandler
- ContentHandlerSAXException
- thrown by SAX Callback functionspublic void writeExternal(java.io.ObjectOutput outArg) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class XMLNode
outArg
- is the ObjectOutput stream used to write the compressed stream.java.io.IOException
- is thrown when there is an exception while writing the compressed stream.public void readExternal(java.io.ObjectInput inArg) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class XMLNode
inArg
- The ObjectInput stream used for reading the compressed streamjava.io.IOException
- is thrown when there is an error in reading the input stream.java.lang.ClassNotFoundException
- is thrown when the class is not foundpublic java.lang.String getData() throws DOMException
getData
in interface CharacterData
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public void setData(java.lang.String data) throws DOMException
setData
in interface CharacterData
data
- 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 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 void setNodeValue(java.lang.String nodeValue) throws DOMException
setNodeValue
in interface Node
setNodeValue
in class XMLNode
DOMException
- 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 CharacterData
public java.lang.String substringData(int offset, int count) throws DOMException
substringData
in interface CharacterData
offset
- 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 CharacterData
arg
- 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 CharacterData
offset
- 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 CharacterData
offset
- 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 CharacterData
offset
- 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 CharacterDataEditVAL
public short canSetData(java.lang.String arg)
canSetData
in interface CharacterDataEditVAL
arg
- Argument to be set.public short canAppendData(java.lang.String arg)
canAppendData
in interface CharacterDataEditVAL
arg
- Data to be appended.public short canReplaceData(int offset, int count, java.lang.String arg) throws DOMException
canReplaceData
in interface CharacterDataEditVAL
offset
- 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 CharacterDataEditVAL
offset
- 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 CharacterDataEditVAL
offset
- 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.
|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |