All Packages Class Hierarchy This Package Previous Next Index
Class oracle.xml.parser.v2.DefaultXMLDocumentHandler
java.lang.Object
|
+----org.xml.sax.HandlerBase
|
+----oracle.xml.parser.v2.DefaultXMLDocumentHandler
- public class DefaultXMLDocumentHandler
- extends HandlerBase
- implements XMLDocumentHandler
This class implements the default behaviour for the
XMLDocumentHandler
interface.
Application writers can extend this class when they need to
implement only part of the interface
-
DefaultXMLDocumentHandler()
- Constructs a default document handler
-
cDATASection(char[], int, int)
- Receive notification of a CDATA Section.
-
characters(char[], int, int)
- Receive notification of character data inside an element.
-
comment(String)
- Receive notification of a comment.
-
endDoctype()
- Receive notification of end of the DTD.
-
endDocument()
- Receive notification of the end of the document.
-
endElement(NSName)
- Receive notification of the end of an element.
-
endElement(String)
- Receive notification of the end of an element.
-
ignorableWhitespace(char[], int, int)
- Receive notification of ignorable whitespace in element content.
-
processingInstruction(String, String)
- Receive notification of a processing instruction.
-
setDoctype(DTD)
- Receive notification of DTD.
-
setDocumentLocator(Locator)
- Receive a Locator object for document events.
-
setTextDecl(String, String)
- Receive notification of a Text XML Declaration.
-
setXMLDecl(String, String, String)
- Receive notification of an XML Declaration.
-
startDocument()
- Receive notification of the beginning of the document.
-
startElement(NSName, SAXAttrList)
- Receive notification of the beginning of an element.
-
startElement(String, AttributeList)
- Receive notification of the start of an element.
DefaultXMLDocumentHandler
public DefaultXMLDocumentHandler()
- Constructs a default document handler
startElement
public void startElement(NSName elem,
SAXAttrList attrlist) throws SAXException
- Receive notification of the beginning of an element.
The Parser will invoke this method at the beginning of every element
in the XML document; there will be a corresponding endElement() event
for every startElement() event (even when the element is empty). All of
the element's content will be reported, inorder, before the
corresponding endElement() event.
By implementing this method instead of
org.xml.sax.DocumentHandler.startElement
, SAX Applications
can get the Namespace support provided by NSName
and
SAXAttrList
.
- Parameters:
- elem - NSName object
- attrlist - SAXAttrList for the element
- Throws: SAXException
- A
SAXException
could be thrown.
- See Also:
- startElement
startElement
public void startElement(String elem,
AttributeList attrlist) throws SAXException
- Receive notification of the start of an element.
- Overrides:
- startElement in class HandlerBase
endElement
public void endElement(NSName elem) throws SAXException
- Receive notification of the end of an element.
The SAX parser will invoke this method at the end of every element in
the XML document; there will be a corresponding startElement() event
for every endElement() event (even when the element is empty).
By implementing this method instead of
org.xml.sax.DocumentHandler.endElement
, SAX Applications
can get the Namespace support provided by NSName
.
- Parameters:
- elem - NSName object
- Throws: SAXException
- A
SAXException
could be thrown.
- See Also:
- endElement
endElement
public void endElement(String elem) throws SAXException
- Receive notification of the end of an element.
- Overrides:
- endElement in class HandlerBase
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Receive a Locator object for document events.
By default, do nothing. Application writers may override this
method in a subclass if they wish to store the locator for use
with other document events.
- Parameters:
- locator - A locator for all SAX document events.
- Overrides:
- setDocumentLocator in class HandlerBase
- See Also:
- setDocumentLocator, Locator
startDocument
public void startDocument() throws SAXException
- Receive notification of the beginning of the document.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions at the beginning
of a document (such as allocating the root node of a tree or
creating an output file).
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
- Overrides:
- startDocument in class HandlerBase
- See Also:
- startDocument
endDocument
public void endDocument() throws SAXException
- Receive notification of the end of the document.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions at the beginning
of a document (such as finalising a tree or closing an output
file).
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
- Overrides:
- endDocument in class HandlerBase
- See Also:
- endDocument
setDoctype
public void setDoctype(DTD dtd) throws SAXException
- Receive notification of DTD.
Sets the DTD
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
endDoctype
public void endDoctype() throws SAXException
- Receive notification of end of the DTD.
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
characters
public void characters(char ch[],
int start,
int length) throws SAXException
- Receive notification of character data inside an element.
By default, do nothing. Application writers may override this
method to take specific actions for each chunk of character data
(such as adding the data to a node or buffer, or printing it to
a file).
- Parameters:
- ch - The characters.
- start - The start position in the character array.
- length - The number of characters to use from the
character array.
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
- Overrides:
- characters in class HandlerBase
- See Also:
- characters
setXMLDecl
public void setXMLDecl(String version,
String standalone,
String encoding) throws SAXException
- Receive notification of an XML Declaration.
The Parser will invoke this method once for XML Decl
- Parameters:
- version - The version number
- standalone - The standalone value (or null, if not specifed)
- encoding - The encoding name (or null, if not specifed)
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
setTextDecl
public void setTextDecl(String version,
String encoding) throws SAXException
- Receive notification of a Text XML Declaration.
The Parser will invoke this method once for each text XML Decl
- Parameters:
- version - The version number (or null, if not specified)
- encoding - The encoding name
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
comment
public void comment(String data) throws SAXException
- Receive notification of a comment.
The Parser will invoke this method once for each comment
found: note that comment may occur before or after the main
document element.
- Parameters:
- data - The comment data, or null if
none was supplied.
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
cDATASection
public void cDATASection(char ch[],
int start,
int length) throws SAXException
- Receive notification of a CDATA Section.
The Parser will invoke this method once for each CDATA Section
found.
- Parameters:
- ch - The CDATA section characters.
- start - The start position in the character array.
- length - The number of characters to use from the
character array.
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
ignorableWhitespace
public void ignorableWhitespace(char ch[],
int start,
int length) throws SAXException
- Receive notification of ignorable whitespace in element content.
By default, do nothing. Application writers may override this
method to take specific actions for each chunk of ignorable
whitespace (such as adding data to a node or buffer, or printing
it to a file).
- Parameters:
- ch - The whitespace characters.
- start - The start position in the character array.
- length - The number of characters to use from the
character array.
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
- Overrides:
- ignorableWhitespace in class HandlerBase
- See Also:
- ignorableWhitespace
processingInstruction
public void processingInstruction(String target,
String data) throws SAXException
- Receive notification of a processing instruction.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions for each
processing instruction, such as setting status variables or
invoking other methods.
- Parameters:
- target - The processing instruction target.
- data - The processing instruction data, or null if
none is supplied.
- Throws: SAXException
- Any SAX exception, possibly
wrapping another exception.
- Overrides:
- processingInstruction in class HandlerBase
- See Also:
- processingInstruction
All Packages Class Hierarchy This Package Previous Next Index