classIBXMLCALL Parser

Parser interface

Inheritance:

Parser


Public

[more] Constructors and destructor.
[more] Parser interface.


Documentation

Parser interface.

A parser implements this interface which enables applications to register handlers to receive notification of XML parsing related events and to initiate parsing.

A particular Parser instance is reusable, but not reentrant. An application may use the same Parser instance after a previous invocation, possibly with a different InputSource, but it may not use the same Parser recursively or simultaneously.

o Constructors and destructor.

o Parser()
Construct an input source.

ovirtual ~Parser()
Destructor.

o Parser interface.

ovoid setDocumentHandler(DocumentHandler* handler)
Set a custom DocumentHandler for the Parser.

If no DocumentHandler is specified, no document events are generated. The DocumentHandler may be specified at any time, also in the middle of a parse, and the parser shall start using the new handler immediately.

Parameters:
handler - A pointer to a DocumentHandler object to be used by the parser, or null if none is specified.

ovoid setDTDHandler(DTDHandler* handler)
Set a custom DTDHandler for the Parser.

If no DTDHandler is specified, no DTD related events are generated. The DTDHandler may be specified at any time, also in the middle of a parse, and the parser shall start using the new handler immediately.

Parameters:
handler - A pointer to a DTDHandler object to be used by the parser, or null if none is specified.

ovoid setEntityResolver(EntityResolver* resolver)
Set a custom EntityResolver for the Parser.

If no EntityResolve is specified, the parser shall resolve entities itself. The EntityResolve may be specified at any time, also in the middle of a parse, and the parser shall start using the new handler immediately.

Parameters:
handler - A pointer to a EntityResolve object to be used by the parser, or null if none is specified.

ovoid setErrorHandler(ErrorHandler* handler)
Set a custom ErrorHandler for the Parser.

If no ErrorHandler is specified, no errors or warnings are generated, except fatal errors. Fatal errors will result in a SAXException being thrown. The ErrorHandler may be specified at any time, also in the middle of a parse, and the parser shall start using the new handler immediately.

Parameters:
handler - A pointer to a ErrorHandler object to be used by the parser, or null if none is specified.

ovoid parse(InputSource& source)
Start parsing of the XML document specified by an input source.

The parser will begin parsing the XML document specified by the input source and call the appropriate DocumentHandler, DTDHandler, ErrorHandler and EntityResolver methods in the same order as the events occur in the XML document.

The application may not call this method recursively or multiple times on the same instance.

Throws:
SAXException A SAXException is thrown to indicate that an error occurred while parsing, and that it was not handled by any ErrorHandler. A IOException is also thrown if an IO error occurs in the underlying URI connection.
Parameters:
source - A reference to an InputSource object to be used by the parser.

ovoid parse(const ibxmlchar* systemId)
Start parsing of the XML document specified by a system identifier[.

The parser will begin parsing the XML document specified by the input source and call the appropriate DocumentHandler, DTDHandler, ErrorHandler and EntityResolver methods in the same order as the events occur in the XML document.

The application may not call this method recursively or multiple times on the same instance.

Throws:
SAXException A SAXException is thrown to indicate that an error occurred while parsing, and that it was not handled by any ErrorHandler. A SAXException is also thrown if an IO error occurs in the underlying URI connection.
Parameters:
systemId - A pointer to a string containing the name of the system identifier to be used by the parser.

ovoid parse(const char* systemId)
Start parsing of the XML document specified by a system identifier.

The parser will begin parsing the XML document specified by the input source and call the appropriate DocumentHandler, DTDHandler, ErrorHandler and EntityResolver methods in the same order as the events occur in the XML document.

The application may not call this method recursively or multiple times on the same instance.

Throws:
SAXException A SAXException is thrown to indicate that an error occurred while parsing, and that it was not handled by any ErrorHandler. A SAXException is also thrown if an IO error occurs in the underlying URI connection.
Parameters:
systemId - A pointer to a string containing the name of the system identifier to be used by the parser.


Direct child classes:
DriverText
DriverIcedb

Alphabetic index Hierarchy of classes



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