classIBXMLCALL HandlerBase: public EntityResolver, public DTDHandler, public DocumentHandler, public ErrorHandler

The HandlerBase class is a convenience class provided to aid developers creating implementations of the DocumentHandler, DTDHandler, ErrorHandler and EntityResolver interfaces for registration with a parser

Inheritance:

HandlerBase - EntityResolver

HandlerBase - DTDHandler

HandlerBase - DocumentHandler

HandlerBase - ErrorHandler


Public

[more] Constructors and destructor.
[more] Default implementation of the DocumentHandler interface.
[more] Default implementation of the EntityResolver interface.
[more] Default implementation of the DTDHandler interface.
[more] Default implementation of the ErrorHandler interface.


Inherited from EntityResolver:

Public

The entity resolver interface.


Inherited from DTDHandler:

Public

The DTD event handler interface.


Inherited from DocumentHandler:

Public

The document event handler interface.


Inherited from ErrorHandler:

Public

The error handler interface.


Documentation

The HandlerBase class is a convenience class provided to aid developers creating implementations of the DocumentHandler, DTDHandler, ErrorHandler and EntityResolver interfaces for registration with a parser. The HandlerBase class may be sub-classed and methods may be overridden by the application and then registered with the parser.

o Constructors and destructor.

o HandlerBase()
Default constructor.

ovirtual ~HandlerBase()
Destructor.

o Default implementation of the DocumentHandler interface.

ovoid startDocument()
Callback notification of a start of document event.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
See Also:
startDocument

ovoid endDocument()
Callback notification of an end of document event.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
See Also:
endDocument

ovoid ignorableWhitespace(const ibxmlchar* s, unsigned int start, unsigned int length)
Callback notification of a text fragment of whitespace.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
ch - A pointer to an array of characters containing the fragment of character text parsed.
start - The index into the array of characters at which the whitespace text fragment parsed begins.
length - The number of whitespace characters passed in the character array which are the subject of this notification. characters at which the whitespace text fragment parsed begins.
See Also:
ignorableWhitespace
characters
characters

ovoid startElement(const ibxmlchar* name, const AttributeList& atts)
Callback notification of a start tag event.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
name - A pointer to a string containing the name of the element. If the element has an explicit namespace prefix, the prefix is part of the name.
atts - A reference to an object of the class AttributeList containing a list of all attributes declared by the element (if any). If no attributes are declared, the getLength() method of the AttributeList object will return 0.
See Also:
startElement
endElement
endElement
AttributeList
endElement

ovoid endElement(const ibxmlchar* name)
Callback notification of an end tag event.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
name - A pointer to a string containing the name of the element. If the element has an explicit namespace prefix, the prefix is part of the name.
See Also:
endElement
startElement
startElement

ovoid characters(const ibxmlchar* s, unsigned int start, unsigned int length)
Callback notification of a character chunk event.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
ch - A pointer to an array of characters containing the fragment of character text parsed.
start - The index into the array of characters at which the whitespace text fragment parsed begins.
length - The number of whitespace characters passed in the character array which are the subject of this notification. characters at which the whitespace text fragment parsed begins.
See Also:
characters
ignorableWhitespace
ignorableWhitespace

ovoid processingInstruction(const ibxmlchar* target, const ibxmlchar* data)
Callback notification of a processing instruction event.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
target - A pointer to a string containing the processing instruction target.
data - A pointer to a string containing the data supplied with the processing instruction, or null if no data was supplied.
See Also:
processingInstruction

ovoid setDocumentLocator(const Locator* locator)
Receive a Locator object for locating the origin of elements in the XML document being parsed.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Parameters:
locator - A pointer to the Locator object of the current parse.
See Also:
setDocumentLocator

o Default implementation of the EntityResolver interface.

oInputSource* resolveEntity(const ibxmlchar* publicId, const ibxmlchar* systemId)
Allow the application to resolve external entities.

By default, return null. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
IOException
Returns:
An InputSource object describing the new input source or null to instruct the parser to open a regular URI connection to the system identifier. The default implementation will always return null.
Parameters:
publicId - A pointer to a string containing the public identifier of the external entity to be resolved, or null if none was supplied.
systemId - A pointer to a string containing the system identifier of the external entity being resolved. If the system identifier is a URI, it will be fully resolved by the parser before the method is invoked.
See Also:
resolveEntity

o Default implementation of the DTDHandler interface.

ovoid notationDecl(const ibxmlchar* name, const ibxmlchar* publicId, const ibxmlchar* systemId)
Callback notifying the client that the parser has encountered a notation declaration.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Parameters:
name - Pointer to a string containing the notation name.
publicId - Pointer to a string containing the public identifier of the notation. If no public identifier is specified, null is passed.
systemId - Pointer to a string containing the system identifier of the notation. If no public identifier is specified, null is passed.
See Also:
notationDecl

ovoid unparsedEntityDecl(const ibxmlchar* name, const ibxmlchar* publicId, const ibxmlchar* systemId, const ibxmlchar* notationName)
Callback notifying the client that the parser has encountered an unparsed entity declaration.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Parameters:
name - Pointer to a string containing the name of the unparsed entity.
publicId - Pointer to a string containing the public identifier of the notation. If no public identifier is specified, null is passed.
systemId - Pointer to a string containing the system identifier of the notation. If no public identifier is specified, null is passed.
notationName - Pointer to a string containing the notation name of the associated notation.
See Also:
unparsedEntityDecl

o Default implementation of the ErrorHandler interface.

ovoid error(SAXParseException& exception)
Notification of a recoverable error which occurred during parsing of the XML document.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
e - A reference to an SAXParseExeception object describing the actual exception which occurred.
See Also:
error

ovoid fatalError(SAXParseException& exception)
Notification of a non-recoverable error which occurred during parsing of the XML document.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
e - A reference to an SAXParseExeception object describing the actual exception which occurred.
See Also:
fatalError

ovoid warning(SAXParseException& exception)
Notification of a recoverable condition which arose during parsing of the XML document.

By default, do nothing. Application writer may override this method to provide suitable handling of this event.

Throws:
SAXException
Parameters:
e - A reference to an SAXParseExeception object describing the actual exception which occurred.
See Also:
warning


Direct child classes:
HandlerDump
See Also:
DocumentHandler
DTDHandler
ErrorHandler
EntityHandler

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.