|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: �CONSTR�|� FUNCTION �|�DATA | DETAIL: �CONSTR�|� FUNCTION �|�DATA |
class IParser: public CInterface { public: virtual ~IParser(); public: virtual void Parse(CInputSource *pSource) = 0; virtual void Parse(const CString &strSystemId) = 0; virtual void SetDocumentHandler( const XDocumentHandler &pHandler) = 0; virtual void SetDtdHandler(const XDtdHandler &pHandler) = 0; virtual void SetEntityResolver( const XEntityResolver &pResolver) = 0; virtual void SetErrorHandler(const XErrorHandler &pHandler) = 0; virtual void SetLocale(const CString &strLocale) = 0; };
The basic interface to SXP parsers.
IErrorHandler, IDocumentHandler, IDtdHandler, CInputSource
Constructor/Destructor Summary | |
~IParser
();
����������Destroys the parser. |
Function Summary | |
void
|
Parse
(CInputSource *pSource);
����������Parses an XML document. |
void
|
Parse
(const CString &strSystemId);
����������Parses an XML document from a system identifier (URI). |
void
|
SetDocumentHandler
(const XDocumentHandler &pHandler);
����������Allows an application to register a document handler. |
void
|
SetDtdHandler
(const XDtdHandler &pHandler);
����������Allows an application to register a DTD event handler. |
void
|
SetEntityResolver
(const XEntityResolver &pResolver);
����������Allows an application to register a custom entity resolver. |
void
|
SetErrorHandler
(const XErrorHandler &pHandler);
����������Allows an application to register an error handler. |
void
|
SetLocale
(const CString &strLocale);
����������Allows an application to request for errors and warnings. |
Constructor/Destructor Detail |
virtual ~IParser();
Destroys the parser.
Function Detail |
virtual void Parse(CInputSource *pSource) = 0;
Parses an XML document.
The application can instruct the SXP parser to parse an XML document from any input source (a character stream, a byte stream, or a URI).
pSource
- the input source
for the the XML documentvirtual void Parse(const CString &strSystemId) = 0;
Parses an XML document from a system identifier (URI).
This method is a shortcut for the common case of reading a document from a system identifier.
strSystemId
- the system identifier (URI)virtual void SetDocumentHandler( const XDocumentHandler &pHandler) = 0;
Allows an application to register a document handler.
If the application does not register a document handler, all document events reported by the SXP parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the SXP parser must begin using the new handler immediately.
pHandler
- the document handlervirtual void SetDtdHandler(const XDtdHandler &pHandler) = 0;
Allows an application to register a DTD event handler.
If the application does not register a DTD handler, all document events reported by the SXP parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the SXP parser must begin using the new handler immediately.
pHandler
- the DTD handlervirtual void SetEntityResolver( const XEntityResolver &pResolver) = 0;
Allows an application to register a custom entity resolver.
If the application does not register an entity resolver, the SXP parser will resolve system identifiers to entities itself.
Applications may register a new or different entity resolver in the middle of a parse, and the SXP parser must begin using the new entity resolver immediately.
pResolver
- the entity resolvervirtual void SetErrorHandler(const XErrorHandler &pHandler) = 0;
Allows an application to register an error handler.
If the application does not register an error handler, all error events will be silently ignored, except for fatal errors, which will throw SXP exceptions.
Applications may register a new or different error handler in the middle of a parse, and the SXP parser must begin using the new error handler immediately.
pHandler
- the error handlervirtual void SetLocale(const CString &strLocale) = 0;
Allows an application to request for errors and warnings.
This is a deprecated feature (indeed, it was never supported by the toolkit).
strLocale
- the name of the locale
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: �CONSTR�|� FUNCTION �|�DATA | DETAIL: �CONSTR�|� FUNCTION �|�DATA |