Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SAX2XMLReaderImpl Class Reference

Inheritance diagram for SAX2XMLReaderImpl:

XMLDocumentHandler XMLErrorReporter XMLEntityHandler List of all members.

Public Methods

Implementation of the XMLDocumentHandler Interface.
virtual void docCharacters (const XMLCh *const chars, const unsigned int length, const bool cdataSection)
virtual void docComment (const XMLCh *const comment)
virtual void docPI (const XMLCh *const target, const XMLCh *const data)
virtual void endDocument ()
virtual void endElement (const XMLElementDecl &elemDecl, const unsigned int urlId, const bool isRoot)
virtual void endEntityReference (const XMLEntityDecl &entDecl)
virtual void ignorableWhitespace (const XMLCh *const chars, const unsigned int length, const bool cdataSection)
virtual void resetDocument ()
virtual void 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)
virtual void startEntityReference (const XMLEntityDecl &entDecl)
virtual void XMLDecl (const XMLCh *const versionStr, const XMLCh *const encodingStr, const XMLCh *const standaloneStr, const XMLCh *const actualEncodingStr)
Getter methods
virtual int getErrorCount () const
virtual ContentHandlergetContentHandler () const
virtual DTDHandlergetDTDHandler () const
virtual EntityResolvergetEntityResolver () const
virtual ErrorHandlergetErrorHandler () const
virtual LexicalHandlergetLexicalHandler () const
virtual DeclHandlergetDeclarationHandler () const
virtual bool getExitOnFirstFatalError () const
virtual bool getValidationConstraintFatal () const
Implementation of SAX 2.0 interface's.
virtual void parse (const InputSource &source)
virtual void parse (const XMLCh *const systemId)
virtual void parse (const char *const systemId)
virtual void setContentHandler (ContentHandler *const handler)
virtual void setDTDHandler (DTDHandler *const handler)
virtual void setEntityResolver (EntityResolver *const resolver)
virtual void setErrorHandler (ErrorHandler *const handler)
virtual void setLexicalHandler (LexicalHandler *const handler)
virtual void setDeclarationHandler (DeclHandler *const handler)
virtual void setExitOnFirstFatalError (const bool newState)
virtual void setValidationConstraintFatal (const bool newState)
virtual void setFeature (const XMLCh *const name, const bool value)
virtual bool getFeature (const XMLCh *const name) const
virtual void setProperty (const XMLCh *const name, void *value)
virtual void * getProperty (const XMLCh *const name) const
Implementation of the XMLErrorReporter Interface.
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)
virtual void resetErrors ()
Implementation of the XMLEntityHandler Interface.
virtual void endInputSource (const InputSource &inputSource)
virtual bool expandSystemId (const XMLCh *const systemId, XMLBuffer &toFill)
virtual void resetEntities ()
virtual InputSourceresolveEntity (const XMLCh *const publicId, const XMLCh *const systemId)
virtual void startInputSource (const InputSource &inputSource)
Implementation of the DocTypeHandler Interface
virtual void attDef (const DTDElementDecl &elemDecl, const DTDAttDef &attDef, const bool ignoring)
virtual void doctypeComment (const XMLCh *const comment)
virtual void doctypeDecl (const DTDElementDecl &elemDecl, const XMLCh *const publicId, const XMLCh *const systemId, const bool hasIntSubset)
virtual void doctypePI (const XMLCh *const target, const XMLCh *const data)
virtual void doctypeWhitespace (const XMLCh *const chars, const unsigned int length)
virtual void elementDecl (const DTDElementDecl &decl, const bool isIgnored)
virtual void endAttList (const DTDElementDecl &elemDecl)
virtual void endIntSubset ()
virtual void endExtSubset ()
virtual void entityDecl (const DTDEntityDecl &entityDecl, const bool isPEDecl, const bool isIgnored)
virtual void resetDocType ()
virtual void notationDecl (const XMLNotationDecl &notDecl, const bool isIgnored)
virtual void startAttList (const DTDElementDecl &elemDecl)
virtual void startIntSubset ()
virtual void startExtSubset ()
virtual void TextDecl (const XMLCh *const versionStr, const XMLCh *const encodingStr)
Validator: setters and getters (Xerces-C specific)
virtual void setValidator (XMLValidator *valueToAdopt)
virtual XMLValidatorgetValidator () const
Advanced document handler list maintenance methods
virtual void installAdvDocHandler (XMLDocumentHandler *const toInstall)
virtual bool removeAdvDocHandler (XMLDocumentHandler *const toRemove)
Progressive scan methods
virtual bool parseFirst (const XMLCh *const systemId, XMLPScanToken &toFill, const bool reuseGrammar=false)
virtual bool parseFirst (const char *const systemId, XMLPScanToken &toFill, const bool reuseGrammar=false)
virtual bool parseFirst (const InputSource &source, XMLPScanToken &toFill, const bool reuseGrammar=false)
virtual bool parseNext (XMLPScanToken &token)
virtual void parseReset (XMLPScanToken &token)

Detailed Description

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

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

we basically re-use the existing SAX1 parser code, but provide a new implementation of XMLContentHandler that raises the new SAX2 style events


Member Function Documentation

void SAX2XMLReaderImpl::attDef const DTDElementDecl &    elemDecl,
const DTDAttDef &    attDef,
const bool    ignoring
[virtual]
 

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.

void SAX2XMLReaderImpl::docCharacters const XMLCh *const    chars,
const unsigned int    length,
const bool    cdataSection
[virtual]
 

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:
DocumentHandler#characters

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::docComment const XMLCh *const    comment [virtual]
 

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.

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::docPI const XMLCh *const    target,
const XMLCh *const    data
[virtual]
 

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:
DocumentHandler#processingInstruction

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::doctypeComment const XMLCh *const    comment [virtual]
 

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.

void SAX2XMLReaderImpl::doctypeDecl const DTDElementDecl &    elemDecl,
const XMLCh *const    publicId,
const XMLCh *const    systemId,
const bool    hasIntSubset
[virtual]
 

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.

void SAX2XMLReaderImpl::doctypePI const XMLCh *const    target,
const XMLCh *const    data
[virtual]
 

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.

void SAX2XMLReaderImpl::doctypeWhitespace const XMLCh *const    chars,
const unsigned int    length
[virtual]
 

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.

void SAX2XMLReaderImpl::elementDecl const DTDElementDecl &    decl,
const bool    isIgnored
[virtual]
 

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.

void SAX2XMLReaderImpl::endAttList const DTDElementDecl &    elemDecl [virtual]
 

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.

void SAX2XMLReaderImpl::endDocument   [virtual]
 

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:
DocumentHandler#endDocument

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::endElement const XMLElementDecl   elemDecl,
const unsigned int    urlId,
const bool    isRoot
[virtual]
 

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:
DocumentHandler#endElement

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::endEntityReference const XMLEntityDecl   entDecl [virtual]
 

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.

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::endExtSubset   [virtual]
 

This method is used to report the end of the external subset.

This method is a no-op for this SAX driver implementation.

void SAX2XMLReaderImpl::endInputSource const InputSource   inputSource [virtual]
 

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

Implements XMLEntityHandler.

void SAX2XMLReaderImpl::endIntSubset   [virtual]
 

This method is used to report the end of the internal subset.

This method is a no-op for this SAX driver implementation.

void SAX2XMLReaderImpl::entityDecl const DTDEntityDecl &    entityDecl,
const bool    isPEDecl,
const bool    isIgnored
[virtual]
 

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:
DTDHandler#unparsedEntityDecl

void SAX2XMLReaderImpl::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
[virtual]
 

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

bool SAX2XMLReaderImpl::expandSystemId const XMLCh *const    systemId,
XMLBuffer   toFill
[virtual]
 

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.

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.
Returns:
'true', if any processing is done, 'false' otherwise.

Implements XMLEntityHandler.

ContentHandler * SAX2XMLReaderImpl::getContentHandler   const [inline, virtual]
 

This method returns the installed content handler.

Returns:
A pointer to the installed content handler object.

DeclHandler * SAX2XMLReaderImpl::getDeclarationHandler   const [inline, virtual]
 

This method returns the installed declaration handler.

Returns:
A pointer to the installed declaration handler object.

DTDHandler * SAX2XMLReaderImpl::getDTDHandler   const [inline, virtual]
 

This method returns the installed DTD handler.

Returns:
A pointer to the installed DTD handler object.

EntityResolver * SAX2XMLReaderImpl::getEntityResolver   const [inline, virtual]
 

This method returns the installed entity resolver.

Returns:
A pointer to the installed entity resolver object.

int SAX2XMLReaderImpl::getErrorCount   const [virtual]
 

Get error count from the last parse operation.

This method returns the error count from the last parse operation. Note that this count is actually stored in the scanner, so this method simply returns what the scanner reports.

Returns:
number of errors encountered during the latest parse operation.

ErrorHandler * SAX2XMLReaderImpl::getErrorHandler   const [inline, virtual]
 

This method returns the installed error handler.

Returns:
A pointer to the installed error handler object.

bool SAX2XMLReaderImpl::getExitOnFirstFatalError   const [inline, virtual]
 

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

bool SAX2XMLReaderImpl::getFeature const XMLCh *const    name const [virtual]
 

Query the current state of any feature in a SAX2 XMLReader.

Parameters:
name The unique identifier (URI) of the feature being set.
Returns:
The current state of the feature.
Exceptions:
SAXNotRecognizedException If the requested feature is not known.

LexicalHandler * SAX2XMLReaderImpl::getLexicalHandler   const [inline, virtual]
 

This method returns the installed lexical handler.

Returns:
A pointer to the installed lexical handler object.

void * SAX2XMLReaderImpl::getProperty const XMLCh *const    name const [virtual]
 

Query the current value of a property in a SAX2 XMLReader.

The parser owns the returned pointer. The memory allocated for the returned pointer will be destroyed when the parser is deleted.

To ensure assessiblity of the returned information after the parser is deleted, callers need to copy and store the returned information somewhere else; otherwise you may get unexpected result. Since the returned pointer is a generic void pointer, see http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties to learn exactly what type of property value each property returns for replication.

Parameters:
name The unique identifier (URI) of the property being set.
Returns:
The current value of the property. The pointer spans the same life-time as the parser. A null pointer is returned if nothing was specified externally.
Exceptions:
SAXNotRecognizedException If the requested property is not known.

bool SAX2XMLReaderImpl::getValidationConstraintFatal   const [inline, virtual]
 

This method returns the state of the parser's validation-constraint-fatal flag.

Returns:
true, if the parser is currently configured to set validation constraint errors as fatal, false otherwise.
See also:
#setValidationContraintFatal

XMLValidator * SAX2XMLReaderImpl::getValidator   const [virtual]
 

This method is used to get the current validator.

SAX2XMLReader assumes responsibility for the validator. It will be deleted when the XMLReader is destroyed.

Returns:
A pointer to the validator. An application should not delete the object returned.

void SAX2XMLReaderImpl::ignorableWhitespace const XMLCh *const    chars,
const unsigned int    length,
const bool    cdataSection
[virtual]
 

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:
DocumentHandler#ignorableWhitespace

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::installAdvDocHandler XMLDocumentHandler *const    toInstall [virtual]
 

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

void SAX2XMLReaderImpl::notationDecl const XMLNotationDecl   notDecl,
const bool    isIgnored
[virtual]
 

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:
DTDHandler#notationDecl

void SAX2XMLReaderImpl::parse const char *const    systemId [virtual]
 

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.

void SAX2XMLReaderImpl::parse const XMLCh *const    systemId [virtual]
 

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.

void SAX2XMLReaderImpl::parse const InputSource   source [virtual]
 

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.

bool SAX2XMLReaderImpl::parseFirst const InputSource   source,
XMLPScanToken   toFill,
const bool    reuseGrammar = false
[virtual]
 

Begin a progressive parse operation

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.

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.
reuseGrammar The flag indicating whether the existing Grammar should be reused or not for this parsing run. If true, there cannot be any internal subset.
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 parse the prolog.
See also:
parseNext

parseFirst(XMLCh*,...)

parseFirst(char*,...)

bool SAX2XMLReaderImpl::parseFirst const char *const    systemId,
XMLPScanToken   toFill,
const bool    reuseGrammar = false
[virtual]
 

Begin a progressive parse operation

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.

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.
reuseGrammar The flag indicating whether the existing Grammar should be reused or not for this parsing run. If true, there cannot be any internal subset.
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 parse the prolog.
See also:
parseNext

parseFirst(XMLCh*,...)

parseFirst(InputSource&,...)

bool SAX2XMLReaderImpl::parseFirst const XMLCh *const    systemId,
XMLPScanToken   toFill,
const bool    reuseGrammar = false
[virtual]
 

Begin a progressive parse operation

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.

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.
reuseGrammar The flag indicating whether the existing Grammar should be reused or not for this parsing run. If true, there cannot be any internal subset.
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 parse the prolog (which means the token will not be valid.)
See also:
parseNext

parseFirst(char*,...)

parseFirst(InputSource&,...)

bool SAX2XMLReaderImpl::parseNext XMLPScanToken   token [virtual]
 

Continue a progressive parse operation

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.

Parameters:
token A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.
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.
See also:
parseFirst(XMLCh*,...)

parseFirst(char*,...)

parseFirst(InputSource&,...)

void SAX2XMLReaderImpl::parseReset XMLPScanToken   token [virtual]
 

Reset the parser after a progressive parse

If a progressive parse loop exits before the end of the document is reached, the parser has no way of knowing this. So it will leave open any files or sockets or memory buffers that were in use at the time that the parse loop exited.

The next parse operation will cause these open files and such to be closed, but the next parse operation might occur at some unknown future point. To avoid this problem, you should reset the parser if you exit the loop early.

If you exited because of an error, then this cleanup will be done for you. Its only when you exit the file prematurely of your own accord, because you've found what you wanted in the file most likely.

Parameters:
token A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.

bool SAX2XMLReaderImpl::removeAdvDocHandler XMLDocumentHandler *const    toRemove [virtual]
 

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

void SAX2XMLReaderImpl::resetDocType   [virtual]
 

This method allows the user installed DTD handler to reset itself.

void SAX2XMLReaderImpl::resetDocument   [virtual]
 

This method allows the user installed Document Handler and any advanced callback handlers to 'reset' themselves.

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::resetEntities   [virtual]
 

This method allows the installed XMLEntityHandler to reset itself.

This method is a no-op for this SAX driver implementation.

Implements XMLEntityHandler.

void SAX2XMLReaderImpl::resetErrors   [virtual]
 

This method allows the user installed Error Handler callback to 'reset' itself.

This method is a no-op for this SAX driver implementation.

Implements XMLErrorReporter.

InputSource * SAX2XMLReaderImpl::resolveEntity const XMLCh *const    publicId,
const XMLCh *const    systemId
[virtual]
 

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.

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.
Returns:
The value returned by the SAX resolveEntity method or NULL otherwise to indicate no processing was done.
See also:
EntityResolver

Implements XMLEntityHandler.

void SAX2XMLReaderImpl::setContentHandler ContentHandler *const    handler [virtual]
 

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.

void SAX2XMLReaderImpl::setDeclarationHandler DeclHandler *const    handler [virtual]
 

Allow an application to register a declaration event handler.

If the application does not register a declaration handler, all events reported by the SAX parser will be silently ignored. (this is the default behaviour implemented by DefaultHandler).

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters:
handler The DTD declaration handler.
See also:
DeclHandler#DeclHandler

SAXException#SAXException

DefaultHandler#DefaultHandler

void SAX2XMLReaderImpl::setDTDHandler DTDHandler *const    handler [virtual]
 

Allow an application to register a DTD event handler.

If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters:
handler The DTD handler.
See also:
DTDHandler#DTDHandler

HandlerBase#HandlerBase

void SAX2XMLReaderImpl::setEntityResolver EntityResolver *const    resolver [virtual]
 

Allow an application to register a custom entity resolver.

If the application does not register an entity resolver, the SAX parser will resolve system identifiers and open connections to entities itself (this is the default behaviour implemented in DefaultHandler).

Applications may register a new or different entity resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.

Parameters:
resolver The object for resolving entities.
See also:
EntityResolver#EntityResolver

DefaultHandler#DefaultHandler

void SAX2XMLReaderImpl::setErrorHandler ErrorHandler *const    handler [virtual]
 

Allow an application to register an error event handler.

If the application does not register an error event handler, all error events reported by the SAX parser will be silently ignored, except for fatalError, which will throw a SAXException (this is the default behaviour implemented by HandlerBase).

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters:
handler The error handler.
See also:
ErrorHandler#ErrorHandler

SAXException#SAXException

HandlerBase#HandlerBase

void SAX2XMLReaderImpl::setExitOnFirstFatalError const bool    newState [virtual]
 

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 SAX2XMLReaderImpl::setFeature const XMLCh *const    name,
const bool    value
[virtual]
 

Set the state of any feature in a SAX2 XMLReader. Supported features in SAX2 for xerces-c are:
(See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Features for detail description).


http://xml.org/sax/features/validation (default: true)
http://xml.org/sax/features/namespaces (default: true)
http://xml.org/sax/features/namespace-prefixes (default: false)
http://apache.org/xml/features/validation/dynamic (default: false)
http://apache.org/xml/features/validation/reuse-grammar (default: false)
http://apache.org/xml/features/validation/schema (default: true)
http://apache.org/xml/features/validation/schema-full-checking (default: false)
http://apache.org/xml/features/validation/reuse-validator (Deprecated) (default: false)

Parameters:
name The unique identifier (URI) of the feature.
value The requested state of the feature (true or false).
Exceptions:
SAXNotRecognizedException If the requested feature is not known.
SAXNotSupportedException Feature modification is not supported during parse

void SAX2XMLReaderImpl::setLexicalHandler LexicalHandler *const    handler [virtual]
 

Allow an application to register a lexical event handler.

If the application does not register a lexical handler, all events reported by the SAX parser will be silently ignored. (this is the default behaviour implemented by HandlerBase).

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters:
handler The error handler.
See also:
LexicalHandler#LexicalHandler

SAXException#SAXException

HandlerBase#HandlerBase

void SAX2XMLReaderImpl::setProperty const XMLCh *const    name,
void *    value
[virtual]
 

Set the value of any property in a SAX2 XMLReader. Supported properties in SAX2 for xerces-c are:
(See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties for detail description).


http://apache.org/xml/properties/schema/external-schemaLocation
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation.

It takes a void pointer as the property value. Application is required to initialize this void pointer to a correct type. See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties to learn exactly what type of property value each property expects for processing. Passing a void pointer that was initialized with a wrong type will lead to unexpected result. If the same property is set more than once, the last one takes effect.

Parameters:
name The unique identifier (URI) of the property being set.
value The requested value for the property. See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties to learn exactly what type of property value each property expects for processing. Passing a void pointer that was initialized with a wrong type will lead to unexpected result.
Exceptions:
SAXNotRecognizedException If the requested property is not known.
SAXNotSupportedException Property modification is not supported during parse

void SAX2XMLReaderImpl::setValidationConstraintFatal const bool    newState [virtual]
 

This method allows users to set the parser's behaviour when it encounters a validtion constraint error. If set to true, and the the parser is set to exit when it encounter the first fatal error, the parser will exit at the first encounter. If false, then it will report the error and continue processing.

The default value is 'false'.

Parameters:
newState The value specifying whether the parser should continue or exit when it encounters a validation constraint error.
See also:
getValidationConstraintFatal

void SAX2XMLReaderImpl::setValidator XMLValidator   valueToAdopt [virtual]
 

This method is used to set a validator.

SAX2XMLReader assumes responsibility for the validator. It will be deleted when the XMLReader is destroyed.

Parameters:
valueToAdopt A pointer to the validator that the reader should use.

void SAX2XMLReaderImpl::startAttList const DTDElementDecl &    elemDecl [virtual]
 

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.

void SAX2XMLReaderImpl::startDocument   [virtual]
 

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:
DocumentHandler#startDocument

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::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
[virtual]
 

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:
DocumentHandler#startElement

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::startEntityReference const XMLEntityDecl   entDecl [virtual]
 

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.

Implements XMLDocumentHandler.

void SAX2XMLReaderImpl::startExtSubset   [virtual]
 

This method is used indicate the start of the external subset.

This method is a no-op for this SAX driver implementation.

void SAX2XMLReaderImpl::startInputSource const InputSource   inputSource [virtual]
 

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.

Implements XMLEntityHandler.

void SAX2XMLReaderImpl::startIntSubset   [virtual]
 

This method is used indicate the start of the internal subset.

This method is a no-op for this SAX driver implementation.

void SAX2XMLReaderImpl::TextDecl const XMLCh *const    versionStr,
const XMLCh *const    encodingStr
[virtual]
 

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.

void SAX2XMLReaderImpl::XMLDecl const XMLCh *const    versionStr,
const XMLCh *const    encodingStr,
const XMLCh *const    standaloneStr,
const XMLCh *const    actualEncodingStr
[virtual]
 

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.

Implements XMLDocumentHandler.


The documentation for this class was generated from the following files:
Generated on Tue Nov 19 09:36:45 2002 by doxygen1.3-rc1