Inheritance diagram for SAX2XMLReaderImpl:
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 ContentHandler * | getContentHandler () const |
virtual DTDHandler * | getDTDHandler () const |
virtual EntityResolver * | getEntityResolver () const |
virtual ErrorHandler * | getErrorHandler () const |
virtual LexicalHandler * | getLexicalHandler () const |
virtual DeclHandler * | getDeclarationHandler () 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 InputSource * | resolveEntity (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 ¬Decl, 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 XMLValidator * | getValidator () 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) |
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
|
This method is used to report an attribute definition. This method is a no-op for this SAX driver implementation.
|
|
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.
Implements XMLDocumentHandler. |
|
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.
Implements XMLDocumentHandler. |
|
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.
Implements XMLDocumentHandler. |
|
This method is used to report a comment occurring within the DTD. This method is a no-op for this SAX driver implementation.
|
|
This method is used to report the DOCTYPE declaration. This method is a no-op for this SAX driver implementation.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
Implements XMLDocumentHandler. |
|
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.
Implements XMLDocumentHandler. |
|
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.
Implements XMLDocumentHandler. |
|
This method is used to report the end of the external subset. This method is a no-op for this SAX driver implementation. |
|
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.
Implements XMLEntityHandler. |
|
This method is used to report the end of the internal subset. This method is a no-op for this SAX driver implementation. |
|
This method is used to report any entity declarations. For unparsed entities, this driver will invoke the SAX DTDHandler::unparsedEntityDecl callback.
|
|
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.
|
|
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.
Implements XMLEntityHandler. |
|
This method returns the installed content handler.
|
|
This method returns the installed declaration handler.
|
|
This method returns the installed DTD handler.
|
|
This method returns the installed entity resolver.
|
|
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.
|
|
This method returns the installed error handler.
|
|
This method returns the state of the parser's exit-on-First-Fatal-Error flag.
|
|
Query the current state of any feature in a SAX2 XMLReader.
|
|
This method returns the installed lexical handler.
|
|
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.
|
|
This method returns the state of the parser's validation-constraint-fatal flag.
|
|
This method is used to get the current validator. SAX2XMLReader assumes responsibility for the validator. It will be deleted when the XMLReader is destroyed.
|
|
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.
Implements XMLDocumentHandler. |
|
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.
|
|
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.
|
|
This method invokes the parsing process on the XML file specified by the native char* string parameter 'systemId'.
|
|
This method invokes the parsing process on the XML file specified by the Unicode string parameter 'systemId'.
|
|
This method invokes the parsing process on the XML file specified by the InputSource parameter.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
This method allows the user installed DTD handler to reset itself. |
|
This method allows the user installed Document Handler and any advanced callback handlers to 'reset' themselves. Implements XMLDocumentHandler. |
|
This method allows the installed XMLEntityHandler to reset itself. This method is a no-op for this SAX driver implementation. Implements XMLEntityHandler. |
|
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. |
|
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.
Implements XMLEntityHandler. |
|
This method installs the user specified SAX Document Handler callback function on parser.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Set the state of any feature in a SAX2 XMLReader. Supported features in SAX2 for xerces-c are:
|
|
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.
|
|
Set the value of any property in a SAX2 XMLReader. Supported properties in SAX2 for xerces-c are:
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.
|
|
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'.
|
|
This method is used to set a validator. SAX2XMLReader assumes responsibility for the validator. It will be deleted when the XMLReader is destroyed.
|
|
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.
|
|
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.
Implements XMLDocumentHandler. |
|
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.
Implements XMLDocumentHandler. |
|
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.
Implements XMLDocumentHandler. |
|
This method is used indicate the start of the external subset. This method is a no-op for this SAX driver implementation. |
|
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.
Implements XMLEntityHandler. |
|
This method is used indicate the start of the internal subset. This method is a no-op for this SAX driver implementation. |
|
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.
|
|
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.
Implements XMLDocumentHandler. |