DefaultXMLDocumentHandler - Oracle 9i

Syntax

Direct Known Subclasses:
XMLTokenizer

All Implemented Interfaces
org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver,
org.xml.sax.ErrorHandler, XMLDocumentHandler

Description
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

Member Summary
Constructors
DefaultXMLDocumentHandler() Constructs a default document handler
Methods
cDATASection(char[], int, int) Receive notification of a CDATA Section.
comment(String) Receive notification of a comment.
endDoctype() Receive notification of end of the DTD.
endElement(NSName) Receive notification of the end of an element.
setDoctype(DTD) Receive notification of DTD.
setTextDecl(String, String) Receive notification of a Text XML Declaration.
setXMLDecl(String, String, String) Receive notification of an XML Declaration.
startElement(NSName, SAXAttrList) Receive notification of the beginning of an element.

inherited member summary

Constructor
DefaultXMLDocumentHandler()
public DefaultXMLDocumentHandler()
Constructs a default document handler

Methods
cDATASection(char[], int, int)
public void cDATASection(char[] ch, int start, int length)
Receive notification of a CDATA Section.
The Parser will invoke this method once for each CDATA Section found.

Specified By
cDATASection(char[ ], int, int) in interface XMLDocumentHandler

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
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

comment(String)
public void comment(java.lang.String data)
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.

Specified By
comment(String) in interface XMLDocumentHandler

Parameters
data - The comment data, or null if none was supplied.

Throws
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

endDoctype()
public void endDoctype()
Receive notification of end of the DTD.

Specified By
endDoctype() in interface XMLDocumentHandler

Throws
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

endElement(NSName)
public void endElement(NSName elem)
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 oforg.xml.sax.DocumentHandler.endElement, SAX Applications can get theNamespace support provided by NSName.

Specified By
endElement(NSName) in interface XMLDocumentHandler

Parameters
elem - NSName object

Throws
org.xml.sax.SAXException - A SAXException could be thrown.

See Also
org.xml.sax.DocumentHandler.endElement(String)

setDoctype(DTD)
public void setDoctype(DTD dtd)
Receive notification of DTD. Sets the DTD

Specified By
setDoctype(DTD) in interface XMLDocumentHandler

Throws
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

setTextDecl(String, String)
public void setTextDecl(java.lang.String version, java.lang.String encoding)
Receive notification of a Text XML Declaration.
The Parser will invoke this method once for each text XML Decl

Specified By
setTextDecl(String, String) in interface XMLDocumentHandler

Parameters
version - The version number (or null, if not specified)
encoding - The encoding name

Throws
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

setXMLDecl(String, String, String)
public void setXMLDecl(java.lang.String version, java.lang.String standalone,
java.lang.String encoding)
Receive notification of an XML Declaration.
The Parser will invoke this method once for XML Decl

Specified By
setXMLDecl(String, String, String) in interface XMLDocumentHandler

Parameters
version - The version number
standalone - The standalone value (or null, if not specifed)
encoding - The encoding name (or null, if not specifed)

Throws
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

startElement(NSName, SAXAttrList)
public void startElement(NSName elem, SAXAttrList attrlist)
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.

Specified By
startElement(NSName, SAXAttrList) in interface XMLDocumentHandler

Parameters
elem - NSName object
attrlist - SAXAttrList for the element

Throws
org.xml.sax.SAXException - A SAXException could be thrown.

See Also
org.xml.sax.DocumentHandler.startElement(String, AttributeList)


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics