oracle.xml.parser.v2
Class XMLPI

oracle.xml.parser.v2.XMLPI
Direct Known Subclasses:
XMLDeclPI

public class XMLPI
implements ProcessingInstruction, java.io.Externalizable, CXMLConstants

This class implements the DOM Processing Instruction interface.

See Also:
ProcessingInstruction, NodeFactory, DOMParser.setNodeFactory(oracle.xml.parser.v2.NodeFactory), Serialized Form

Fields inherited from interface oracle.xml.comp.CXMLConstants
ATTR_DEF, ATTR_TOKEN, ATTRDECL_DEF, CDATA_DEF, CHAR_DEF, COMMENT_DEF, CXML_VERSION, cXMLFILE, cXMLFILE_LEN, DEBUG, DTD_DEF, ELEMENTDECL_DEF, END, ENTITY_DEF, ENTITYREF_DEF, META_ID_MAX, names, NOTATION_DEF, NS_DEF, NULLSTR, PI_DEF, PREFIX_DEF, TAG_DEF, TAG_TOKEN, TOKEN_ONLY, XMLDECL_DEF
 
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
 
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
 
Method Summary
TypeMethod
 XMLNode addText(java.lang.String str)
           
 java.lang.String getNodeName()
          Gets the name of the PI
 short getNodeType()
          Gets a code representing the type of the underlying object
 java.lang.String getTarget()
          Returns the target of this PI.
 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 readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext)
          This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
 void reportSAXEvents(ContentHandler cntHandler)
          Report SAX Events from a DOM Tree
 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.
 

Constructor Detail

XMLPI

public XMLPI()
Deprecated. use createProcessingInstruction(String) method of XMLDocument

Default constructor. Note that this constructor is used only during deserialization/decompression of this DOM node. In order to deserialize this node to construct the DOM node from the serialized/ compressed stream, it is required to create a handle of the object.

XMLPI

public XMLPI(java.lang.String target,
             java.lang.String data)
Deprecated. see createProcessingInstruction(String) of XMLDocument

Creates a new ProcessingInstruction node with the given target and the data.
Parameters:
target - The target of this PI
data - The content of this PI
Method Detail

getNodeName

public java.lang.String getNodeName()
Gets the name of the PI
Returns:
name of the node

getNodeType

public short getNodeType()
Gets a code representing the type of the underlying object
Returns:
type of the node

getTarget

public java.lang.String getTarget()
Returns the target of this PI. XML defines this as the first token following markup that begins the processing instruction.
Specified by:
getTarget in interface ProcessingInstruction
Returns:
The target of the PI.

addText

public XMLNode addText(java.lang.String str)

reportSAXEvents

public void reportSAXEvents(ContentHandler cntHandler)
                     throws SAXException
Report SAX Events from a DOM Tree
Parameters:
ContentHandler - cntHandler
Throws:
SAXException - thrown by SAX Callback functions

writeExternal

public void writeExternal(java.io.ObjectOutput outArg)
                   throws java.io.IOException
This method saves the state of the object by creating a binary compressed stream with information about this object.
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - is the ObjectOutput stream used to write the compressed stream.
Throws:
java.io.IOException - is thrown when there is an exception while writing the compressed stream.

readExternal

public void readExternal(java.io.ObjectInput inArg)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - The ObjectInput stream used for reading the compressed stream
Throws:
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

readExternal

public void readExternal(oracle.xml.io.XMLObjectInput in,
                         oracle.xml.comp.CXMLContext cxmlContext)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
Parameters:
in - The XMLObjectInput stream used for reading the compressed stream
Throws:
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