class SAXParser : public Parser, public XMLDocumentHandler, public XMLErrorReporter, public XMLEntityHandler, public DocTypeHandler

This class implements the SAX 'Parser' interface and should be used by applications wishing to parse the XML files using SAX

Inheritance:



Inherited from Parser:

Public

Constructors and Destructor

Parser()
The default constructor
virtual ~Parser()
The destructor

The parser interfaces

virtual void setEntityResolver(EntityResolver* const resolver)
Allow an application to register a custom entity resolver
virtual void setDTDHandler(DTDHandler* const handler)
Allow an application to register a DTD event handler
virtual void setDocumentHandler(DocumentHandler* const handler)
Allow an application to register a document event handler
virtual void setErrorHandler(ErrorHandler* const handler)
Allow an application to register an error event handler
virtual void parse( const InputSource& source, const bool reuseValidator = false )
Parse an XML document
virtual void parse( const XMLCh* const systemId, const bool reuseValidator = false )
Parse an XML document from a system identifier (URI)
virtual void parse( const char* const systemId, const bool reuseValidator = false )
Parse an XML document from a system identifier (URI)

Inherited from XMLDocumentHandler:

Public

Destructor

The document handler interface

virtual void docCharacters( const XMLCh* const chars, const unsigned int length, const bool cdataSection )
Receive notification of character data
virtual void docComment( const XMLCh* const comment )
Receive notification of comments in the XML content being parsed
virtual void docPI( const XMLCh* const target, const XMLCh* const data )
Receive notification of PI's parsed in the XML content
virtual void endDocument()
Receive notification after the scanner has parsed the end of the document
virtual void endElement( const XMLElementDecl& elemDecl, const unsigned int uriId, const bool isRoot )
Receive notification of the end of an element
virtual void endEntityReference( const XMLEntityDecl& entDecl )
Receive notification when a referenced entity's content ends This method is called when scanner encounters the end of an entity reference
virtual void ignorableWhitespace( const XMLCh* const chars, const unsigned int length, const bool cdataSection )
Receive notification of ignorable whitespace in element content
virtual void resetDocument()
Reset the document handler's state, if required This method is used to give the registered document handler a chance to reset itself
virtual void startDocument()
Receive notification of the start of a new document This method is the first callback called the scanner at the start of every parse
virtual void startElement( const XMLElementDecl& elemDecl, const unsigned int uriId, const XMLCh* const prefixName, const RefVectorOf<XMLAttr>& attrList, const unsigned int attrCount, const bool isEmpty, const bool isRoot )
Receive notification of a new start tag This method is called when scanner encounters the start of an element tag
virtual void startEntityReference(const XMLEntityDecl& entDecl)
Receive notification when the scanner hits an entity reference
virtual void XMLDecl( const XMLCh* const versionStr, const XMLCh* const encodingStr, const XMLCh* const standaloneStr, const XMLCh* const autoEncodingStr )
Receive notification of an XML declaration Currently neither DOM nor SAX provide API's to return back this information

Inherited from XMLErrorReporter:

Public Methods

virtual void error( const unsigned int errCode, const XMLCh* const errDomain, const ErrTypes type, const XMLCh* const errorText, const XMLCh* const systemId, const XMLCh* const publicId, const unsigned int lineNum, const unsigned int colNum )
virtual void resetErrors()

Public

protected Constructor

XMLErrorReporter()
Default constructor

Error Handler interface


Inherited from XMLEntityHandler:

Public

The pure virtual methods in this interface.

virtual void endInputSource(const InputSource& inputSource)
This method get called after the scanner has finished reading from the given input source while processing external entity references
virtual bool expandSystemId( const XMLCh* const systemId, XMLBuffer& toFill )
This method allows the passes the scanned systemId to the entity handler, thereby giving it a chance to provide any customized handling like resolving relative path names
virtual void resetEntities()
This method allows the entity handler to reset itself, so that it can be used again
virtual InputSource* resolveEntity( const XMLCh* const publicId, const XMLCh* const systemId )
This method allows the entity handler to provide customized application specific entity resolution
virtual void startInputSource(const InputSource& inputSource)
This method will be called before the scanner starts reading from an input source while processing external entity references

Documentation

This class implements the SAX 'Parser' interface and should be used by applications wishing to parse the XML files using SAX. It allows the client program to install SAX handlers for event callbacks.

It can be used to instantiate a validating or non-validating parser, by setting a member flag.

SAXParser(XMLValidator* const valToAdopt = 0)
Constructor with an instance of validator class to use for validation
Parameters:
valToAdopt - Pointer to the validator instance to use. The parser is responsible for freeing the memory.

~SAXParser()
Destructor

DocumentHandler* getDocumentHandler()
This method returns the installed document handler. Suitable for 'lvalue' usages.
Returns:
The pointer to the installed document handler object.

const DocumentHandler* getDocumentHandler() const
This method returns the installed document handler. Suitable only for 'rvalue' usages.
Returns:
A const pointer to the installed document handler object.

EntityResolver* getEntityResolver()
This method returns the installed entity resolver. Suitable for 'lvalue' usages.
Returns:
The pointer to the installed entity resolver object.

const EntityResolver* getEntityResolver() const
This method returns the installed entity resolver. Suitable for 'rvalue' usages.
Returns:
A const pointer to the installed entity resolver object.

ErrorHandler* getErrorHandler()
This method returns the installed error handler. Suitable for 'lvalue' usages.
Returns:
The pointer to the installed error handler object.

const ErrorHandler* getErrorHandler() const
This method returns the installed error handler. Suitable for 'rvalue' usages.
Returns:
A const pointer to the installed error handler object.

const XMLScanner& getScanner() const
This method returns a reference to the underlying scanner object. It allows read only access to data maintained in the scanner.
Returns:
A const reference to the underlying scanner object.

const XMLValidator& getValidator() const
This method returns a reference to the parser's installed validator.
Returns:
A const reference to the installed validator object.

bool getDoNamespaces() const
This method returns the state of the parser's namespace handling capability.
Returns:
true, if the parser is currently configured to understand namespaces, false otherwise.
See Also:
setDoNamespaces

bool getDoValidation() const
This method returns the state of the parser's validation handling flag which controls whether validation checks are enforced or not.
Returns:
true, if the parser is currently configured to do validation, false otherwise.
See Also:
setDoValidation

bool getExitOnFirstFatalError() const
This method returns the state of the parser's exit-on-First-Fatal-Error flag.
Returns:
true, if the parser is currently configured to exit on the first fatal error, false otherwise.
See Also:
setExitOnFirstFatalError

void setDoNamespaces(const bool newState)
This method allows users to enable or disable the parser's namespace processing. When set to true, parser starts enforcing all the constraints / rules specified by the NameSpace specification.

The parser's default state is: false.

This flag is ignored by the underlying scanner if the installed validator indicates that namespace constraints should be enforced.

Parameters:
newState - The value specifying whether NameSpace rules should be enforced or not.
See Also:
getDoNamespaces

void setDoValidation(const bool newState)
This method allows users to enable or disable the parser's validation checks.

By default, the parser does not to any validation. The default value is false.

Parameters:
newState - The value specifying whether the parser should do validity checks or not against the DTD in the input XML document.
See Also:
getDoValidation

void setExitOnFirstFatalError(const bool newState)
This method allows users to set the parser's behaviour when it encounters the first fatal error. If set to true, the parser will exit at the first fatal error. If false, then it will report the error and continue processing.

The default value is 'true' and the parser exits on the first fatal error.

Parameters:
newState - The value specifying whether the parser should continue or exit when it encounters the first fatal error.
See Also:
getExitOnFirstFatalError

void installAdvDocHandler(XMLDocumentHandler* const toInstall)
This method installs the specified 'advanced' document callback handler, thereby allowing the user to customize the processing, if they choose to do so. Any number of advanced callback handlers maybe installed.

The methods in the advanced callback interface represent Xerces-C extensions. There is no specification for this interface.

Parameters:
toInstall - A pointer to the users advanced callback handler.
See Also:
removeAdvDocHandler

bool removeAdvDocHandler(XMLDocumentHandler* const toRemove)
This method removes the 'advanced' document handler callback from the underlying parser scanner. If no handler is installed, advanced callbacks are not invoked by the scanner.
Parameters:
toRemove - A pointer to the advanced callback handler which should be removed.
See Also:
installAdvDocHandler

virtual void parse(const InputSource& source, const bool reuseValidator = false)
This method invokes the parsing process on the XML file specified by the InputSource parameter.
Parameters:
source - A const reference to the InputSource object which points to the XML file to be parsed.
reuseValidator - The flag indicating whether the existing validator should be reused or not for this parsing run.
See Also:
parse(InputSource)

virtual void parse(const XMLCh* const systemId, const bool reuseValidator = false)
This method invokes the parsing process on the XML file specified by the Unicode string parameter 'systemId'.
Parameters:
systemId - A const XMLCh pointer to the Unicode string which contains the path to the XML file to be parsed.
reuseValidator - The flag indicating whether the existing validator should be reused or not for this parsing run.
See Also:
parse(XMLCh*)

virtual void parse(const char* const systemId, const bool reuseValidator = false)
This method invokes the parsing process on the XML file specified by the native char* string parameter 'systemId'.
Parameters:
systemId - A const char pointer to a native string which contains the path to the XML file to be parsed.
reuseValidator - The flag indicating whether the existing validator should be reused or not for this parsing run.

virtual void setDocumentHandler(DocumentHandler* const handler)
This method installs the user specified SAX Document Handler callback function on parser.
Parameters:
handler - A pointer to the document handler to be called when the parser comes across 'document' events as per the SAX specification.
See Also:
parse(char*)

virtual void setDTDHandler(DTDHandler* const handler)
This method installs the user specified DTD handler on the parser.
Parameters:
handler - A pointer to the DTD handler to be called when the parser comes across 'DTD' events as per the SAX specification.
See Also:
setDTDHandler

virtual void setErrorHandler(ErrorHandler* const handler)
This method installs the user specified error handler on the parser.
Parameters:
handler - A pointer to the error handler to be called when the parser comes across 'error' events as per the SAX specification.
See Also:
setErrorHandler

virtual void setEntityResolver(EntityResolver* const resolver)
This method installs the user specified entity resolver on the parser. It allows applications to trap and redirect calls to external entities.
Parameters:
handler - A pointer to the entity resolver to be called when the parser comes across references to entities in the XML file.
See Also:
setEntityResolver

bool parseFirst( const XMLCh* const systemId, XMLPScanToken& toFill, const bool reuseValidator = false )

This method is used to start a progressive parse on a XML file. To continue parsing, subsequent calls must be to the parseNext method.

It scans through the prolog and returns a token to be used on subsequent scanNext() calls. If the return value is true, then the token is legal and ready for further use. If it returns false, then the scan of the prolog failed and the token is not going to work on subsequent scanNext() calls.

Returns:
'true', if successful in parsing the prolog. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not find a proper prolog definition.
Parameters:
systemId - A pointer to a Unicode string represting the path to the XML file to be parsed.
toFill - A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.
reuseValidator - The flag indicating whether the existing validator should be reused or not for this parsing run.
See Also:
parseNext
parseFirst(char*,...)
parseFirst(InputSource&,...)

bool parseFirst( const char* const systemId, XMLPScanToken& toFill, const bool reuseValidator = false )

This method is used to start a progressive parse on a XML file. To continue parsing, subsequent calls must be to the parseNext method.

It scans through the prolog and returns a token to be used on subsequent scanNext() calls. If the return value is true, then the token is legal and ready for further use. If it returns false, then the scan of the prolog failed and the token is not going to work on subsequent scanNext() calls.

Returns:
'true', if successful in parsing the prolog. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not find a proper prolog definition.
Parameters:
systemId - A pointer to a regular native string represting the path to the XML file to be parsed.
toFill - A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.
reuseValidator - The flag indicating whether the existing validator should be reused or not for this parsing run.
See Also:
parseNext
parseFirst(XMLCh*,...)
parseFirst(InputSource&,...)

bool parseFirst( const InputSource& source, XMLPScanToken& toFill, const bool reuseValidator = false )

This method is used to start a progressive parse on a XML file. To continue parsing, subsequent calls must be to the parseNext method.

It scans through the prolog and returns a token to be used on subsequent scanNext() calls. If the return value is true, then the token is legal and ready for further use. If it returns false, then the scan of the prolog failed and the token is not going to work on subsequent scanNext() calls.

Returns:
'true', if successful in parsing the prolog. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not find a proper prolog definition.
Parameters:
source - A const reference to the InputSource object which points to the XML file to be parsed.
toFill - A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.
reuseValidator - The flag indicating whether the existing validator should be reused or not for this parsing process.
See Also:
parseNext
parseFirst(XMLCh*,...)
parseFirst(char*,...)

bool parseNext(XMLPScanToken& token)

This method is used to continue with progressive parsing of XML files started by a call to 'parseFirst' method.

It parses the XML file and stops as soon as it comes across a XML token (as defined in the XML specification). Relevant callback handlers are invoked as required by the SAX specification.

Returns:
'true', if successful in parsing the next XML token. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not find next token as per the XML specification production rule.
Parameters:
token - A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.
See Also:
parseFirst(XMLCh*,...)
parseFirst(char*,...)
parseFirst(InputSource&,...)

virtual void attDef( const DTDElementDecl& elemDecl, const DTDAttDef& attDef, const bool ignoring )
This method is used to report an attribute definition. This method is a no-op for this SAX driver implementation.
Parameters:
elemDecl - A const reference to the object containing information about the element whose attribute definition was just parsed.
attDef - A const reference to the object containing information attribute definition.
ignore - The flag indicating whether this attribute definition was ignored by the parser or not.

virtual void doctypeComment( const XMLCh* const comment )
This method is used to report a comment occurring within the DTD. This method is a no-op for this SAX driver implementation.
Parameters:
comment - A const pointer to a Unicode string representing the text of the comment just parsed.

virtual void doctypeDecl( const DTDElementDecl& elemDecl, const XMLCh* const publicId, const XMLCh* const systemId, const bool hasIntSubset )
This method is used to report the DOCTYPE declaration. This method is a no-op for this SAX driver implementation.
Parameters:
elemDecl - A const reference to the object containing information about the root element definition declaration of the XML document being parsed.
publicId - A const pointer to a Unicode string representing the public id of the DTD file.
systemId - A const pointer to a Unicode string representing the system id of the DTD file.
hasIntSubset - A flag indicating if this XML file contains any internal subset.

virtual void doctypePI( const XMLCh* const target, const XMLCh* const data )
This method is used to report any PI declarations occurring inside the DTD definition block. This method is a no-op for this SAX driver implementation.
Parameters:
target - A const pointer to a Unicode string representing the target of the PI declaration.
data - A const pointer to a Unicode string representing the data of the PI declaration. See the PI production rule in the XML specification for details.

virtual void doctypeWhitespace( const XMLCh* const chars, const unsigned int length )
This method is used to report any whitespaces occurring inside the DTD definition block. This method is a no-op for this SAX driver implementation.
Parameters:
chars - A const pointer to a Unicode string representing the whitespace characters.
length - The length of the whitespace Unicode string.

virtual void elementDecl( const DTDElementDecl& decl, const bool isIgnored )
This method is used to report an element declarations successfully scanned by the parser. This method is a no-op for this SAX driver implementation.
Parameters:
decl - A const reference to the object containing element declaration information.
isIgnored - The flag indicating whether this definition was ignored by the parser or not.

virtual void endAttList( const DTDElementDecl& elemDecl )
This method is used to report the end of an attribute list declaration for an element. This method is a no-op for this SAX driver implementation.
Parameters:
elemDecl - A const reference to the object containing element declaration information.

virtual void endIntSubset()
This method is used to report the end of the internal subset. This method is a no-op for this SAX driver implementation.

virtual void endExtSubset()
This method is used to report the end of the external subset. This method is a no-op for this SAX driver implementation.

virtual void entityDecl( const DTDEntityDecl& entityDecl, const bool isPEDecl, const bool isIgnored )
This method is used to report any entity declarations. For unparsed entities, this driver will invoke the SAX DTDHandler::unparsedEntityDecl callback.
Parameters:
entityDecl - A const reference to the object containing the entity declaration information.
isPEDecl - The flag indicating whether this was a parameter entity declaration or not.
isIgnored - The flag indicating whether this definition was ignored by the parser or not.
See Also:
unparsedEntityDecl

virtual void resetDocType()
This method allows the user installed DTD handler to reset itself

virtual void notationDecl( const XMLNotationDecl& notDecl, const bool isIgnored )
This method is used to report any notation declarations. If there is a user installed DTDHandler, then the driver will invoke the SAX DTDHandler::notationDecl callback.
Parameters:
notDecl - A const reference to the object containing the notation declaration information.
isIgnored - The flag indicating whether this definition was ignored by the parser or not.
See Also:
notationDecl

virtual void startAttList( const DTDElementDecl& elemDecl )
This method is used to indicate the start of an element's attribute list declaration. This method is a no-op for this SAX driver implementation.
Parameters:
elemDecl - A const reference to the object containing element declaration information.

virtual void startIntSubset()
This method is used indicate the start of the internal subset. This method is a no-op for this SAX driver implementation.

virtual void startExtSubset()
This method is used indicate the start of the external subset. This method is a no-op for this SAX driver implementation.

virtual void TextDecl( const XMLCh* const versionStr, const XMLCh* const encodingStr )
This method is used to report the TextDecl. Refer to the XML specification for the syntax of a TextDecl. This method is a no-op for this SAX driver implementation.
Parameters:
versionStr - A const pointer to a Unicode string representing the version number of the 'version' clause.
encodingStr - A const pointer to a Unicode string representing the encoding name of the 'encoding' clause.

virtual void docCharacters( const XMLCh* const chars, const unsigned int length, const bool cdataSection )
This method is used to report all the characters scanned by the parser. The driver will invoke the 'characters' method of the user installed SAX Document Handler.

If any advanced callback handlers are installed, the corresponding 'docCharacters' method will also be invoked.

Parameters:
chars - A const pointer to a Unicode string representing the character data.
length - The length of the Unicode string returned in 'chars'.
cdataSection - A flag indicating if the characters represent content from the CDATA section.
See Also:
characters

virtual void docComment( const XMLCh* const comment )
This method is used to report any comments scanned by the parser. This method is a no-op unless, unless an advanced callback handler is installed, in which case the corresponding 'docComment' method is invoked.
Parameters:
comment - A const pointer to a null terminated Unicode string representing the comment text.

virtual void docPI( const XMLCh* const target, const XMLCh* const data )
This method is used to report any PI scanned by the parser.

Any PI's occurring before any 'content' are not reported to any SAX handler as per the specification. However, all PI's within content are reported via the SAX Document Handler's 'processingInstruction' method.

If any advanced callback handlers are installed, the corresponding 'docPI' method will be invoked.

Parameters:
target - A const pointer to a Unicode string representing the target of the PI declaration.
data - A const pointer to a Unicode string representing the data of the PI declaration. See the PI production rule in the XML specification for details.
See Also:
processingInstruction

virtual void endDocument()
This method is used to indicate the end of root element was just scanned by the parser. Corresponding 'endDocument' method of the user installed SAX Document Handler will also be invoked.

In addition, if any advanced callback handlers are installed, the corresponding 'endDocument' method is invoked.

See Also:
endDocument

virtual void endElement( const XMLElementDecl& elemDecl, const unsigned int urlId, const bool isRoot )
This method is used to indicate the end tag of an element. The driver will invoke the corresponding 'endElement' method of the SAX Document Handler interface.

If any advanced callback handlers are installed, the corresponding 'endElement' method is also invoked.

Parameters:
elemDecl - A const reference to the object containing element declaration information.
urlId - An id referring to the namespace prefix, if namespaces setting is switched on.
isRoot - A flag indicating whether this element was the root element.
See Also:
endElement

virtual void endEntityReference( const XMLEntityDecl& entDecl )
This method is used to indicate that an end of an entity reference was just scanned.

If any advanced callback handlers are installed, the corresponding 'endEnityReference' method is invoked.

Parameters:
entDecl - A const reference to the object containing the entity declaration information.

virtual void ignorableWhitespace( const XMLCh* const chars, const unsigned int length, const bool cdataSection )
This method is used to report all the whitespace characters, which are determined to be 'ignorable'. This distinction between characters is only made, if validation is enabled. Corresponding 'ignorableWhitespace' method of the user installed SAX Document Handler interface is called.

Any whitespace before content is not reported to the SAX Document Handler method, as per the SAX specification. However, if any advanced callback handlers are installed, the corresponding 'ignorableWhitespace' method is invoked.

Parameters:
chars - A const pointer to a Unicode string representing the ignorable whitespace character data.
length - The length of the Unicode string 'chars'.
cdataSection - A flag indicating if the characters represent content from the CDATA section.
See Also:
ignorableWhitespace

virtual void resetDocument()
This method allows the user installed Document Handler and any advanced callback handlers to 'reset' themselves

virtual void startDocument()
This method is used to report the start of the parsing process. The corresponding user installed SAX Document Handler's method 'startDocument' is invoked.

If any advanced callback handlers are installed, then the corresponding 'startDocument' method is also called.

See Also:
startDocument

virtual void startElement( const XMLElementDecl& elemDecl, const unsigned int urlId, const XMLCh* const elemPrefix, const RefVectorOf<XMLAttr>& attrList, const unsigned int attrCount, const bool isEmpty, const bool isRoot )
This method is used to report the start of an element. It is called at the end of the element, by which time all attributes specified are also parsed. The corresponding user installed SAX Document Handler's method 'startElement' is invoked.

If any advanced callback handlers are installed, then the corresponding 'startElement' method is also called.

Parameters:
elemDecl - A const reference to the object containing element declaration information.
urlId - An id referring to the namespace prefix, if namespaces setting is switched on.
elemPrefix - A const pointer to a Unicode string containing the namespace prefix for this element. Applicable only when namespace processing is enabled.
attrList - A const reference to the object containing the list of attributes just scanned for this element.
attrCount - A count of number of attributes in the list specified by the parameter 'attrList'.
isEmpty - A flag indicating whether this is an empty element or not.
isRoot - A flag indicating whether this element was the root element.
See Also:
startElement

virtual void startEntityReference( const XMLEntityDecl& entDecl )
This method is used to indicate the start of an entity reference.

If any advanced callback handlers are installed, the corresponding 'endEnityReference' method is invoked.

Parameters:
entDecl - A const reference to the object containing the entity declaration information.

virtual void XMLDecl( const XMLCh* const versionStr, const XMLCh* const encodingStr, const XMLCh* const standaloneStr, const XMLCh* const actualEncodingStr )
This method is used to report the XML decl scanned by the parser. Refer to the XML specification to see the meaning of parameters. This method is a no-op for this SAX driver implementation.
Parameters:
versionStr - A const pointer to a Unicode string representing version string value.
encodingStr - A const pointer to a Unicode string representing the encoding string value.
standaloneStr - A const pointer to a Unicode string representing the standalone string value.
actualEncodingStr - A const pointer to a Unicode string representing the actual encoding string value.

virtual void error( const unsigned int errCode, const XMLCh* const msgDomain, const XMLErrorReporter::ErrTypes errType, const XMLCh* const errorText, const XMLCh* const systemId, const XMLCh* const publicId, const unsigned int lineNum, const unsigned int colNum )
This method is used to report back errors found while parsing the XML file. The driver will call the corresponding user installed SAX Error Handler methods: 'fatal', 'error', 'warning' depending on the severity of the error. This classification is defined by the XML specification.
Parameters:
errCode - An integer code for the error.
msgDomain - A const pointer to an Unicode string representing the message domain to use.
errType - An enumeration classifying the severity of the error.
errorText - A const pointer to an Unicode string representing the text of the error message.
systemId - A const pointer to an Unicode string representing the system id of the XML file where this error was discovered.
publicId - A const pointer to an Unicode string representing the public id of the XML file where this error was discovered.
lineNum - The line number where the error occurred.
colNum - The column number where the error occurred.
See Also:
ErrorHandler

virtual void resetErrors()
This method allows the user installed Error Handler callback to 'reset' itself. This method is a no-op for this SAX driver implementation.

virtual void endInputSource(const InputSource& inputSource)
This method is used to indicate the end of parsing of an external entity file. This method is a no-op for this SAX driver implementation.
Parameters:
inputSource - A const reference to the InputSource object which points to the XML file being parsed.
See Also:
InputSource

virtual bool expandSystemId( const XMLCh* const systemId, XMLBuffer& toFill )
This method allows an installed XMLEntityHandler to further process any system id's of enternal entities encountered in the XML file being parsed, such as redirection etc. This method always returns 'false' for this SAX driver implementation.
Returns:
'true', if any processing is done, 'false' otherwise.
Parameters:
systemId - A const pointer to an Unicode string representing the system id scanned by the parser.
toFill - A pointer to a buffer in which the application processed system id is stored.

virtual void resetEntities()
This method allows the installed XMLEntityHandler to reset itself. This method is a no-op for this SAX driver implementation.

virtual InputSource* resolveEntity( const XMLCh* const publicId, const XMLCh* const systemId )
This method allows a user installed entity handler to further process any pointers to external entities. The applications can implement 'redirection' via this callback. The driver should call the SAX EntityHandler 'resolveEntity' method.
Returns:
The value returned by the SAX resolveEntity method or NULL otherwise to indicate no processing was done.
Parameters:
publicId - A const pointer to a Unicode string representing the public id of the entity just parsed.
systemId - A const pointer to a Unicode string representing the system id of the entity just parsed.
See Also:
EntityResolver

virtual void startInputSource(const InputSource& inputSource)
This method is used to indicate the start of parsing an external entity file. This method is a no-op for this SAX driver implementation.
Parameters:
inputSource - A const reference to the InputSource object which points to the external entity being parsed.


This class has no child classes.

alphabetic index hierarchy of classes


Xerces-C XML Parser for C++ Version 1.1
Copyright © 2000 The Apache Software Foundation. All Rights Reserved.

generated by doc++