|  | 
| 
 Public Types | 
| enum | ValSchemes { Val_Never, 
Val_Always, 
Val_Auto
 } | 
|  | ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors.  More... 
 | 
| 
 Public Member Functions | 
|  | 
|  | SAXParser (XMLValidator *const valToAdopt=0, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager, XMLGrammarPool *const gramPool=0) | 
|  | Constructor with an instance of validator class to use for validation. 
 | 
|  | ~SAXParser () | 
|  | Destructor. 
 | 
|  | 
| DocumentHandler * | getDocumentHandler () | 
|  | This method returns the installed document handler. 
 | 
| const DocumentHandler * | getDocumentHandler () const | 
|  | This method returns the installed document handler. 
 | 
| EntityResolver * | getEntityResolver () | 
|  | This method returns the installed entity resolver. 
 | 
| const EntityResolver * | getEntityResolver () const | 
|  | This method returns the installed entity resolver. 
 | 
| XMLEntityResolver * | getXMLEntityResolver () | 
|  | This method returns the installed entity resolver. 
 | 
| const XMLEntityResolver * | getXMLEntityResolver () const | 
|  | This method returns the installed entity resolver. 
 | 
| ErrorHandler * | getErrorHandler () | 
|  | This method returns the installed error handler. 
 | 
| const ErrorHandler * | getErrorHandler () const | 
|  | This method returns the installed error handler. 
 | 
| PSVIHandler * | getPSVIHandler () | 
|  | This method returns the installed PSVI handler. 
 | 
| const PSVIHandler * | getPSVIHandler () const | 
|  | This method returns the installed PSVI handler. 
 | 
| const XMLValidator & | getValidator () const | 
|  | This method returns a reference to the parser's installed validator. 
 | 
| ValSchemes | getValidationScheme () const | 
|  | This method returns an enumerated value that indicates the current validation scheme set on this parser. 
 | 
| bool | getDoSchema () const | 
|  | Get the 'do schema' flag. 
 | 
| bool | getValidationSchemaFullChecking () const | 
|  | Get the 'full schema constraint checking' flag. 
 | 
| bool | getIdentityConstraintChecking () const | 
|  | Get the 'identity constraint checking' flag. 
 | 
| int | getErrorCount () const | 
|  | Get error count from the last parse operation. 
 | 
| bool | getDoNamespaces () const | 
|  | This method returns the state of the parser's namespace handling capability. 
 | 
| bool | getExitOnFirstFatalError () const | 
|  | This method returns the state of the parser's exit-on-First-Fatal-Error flag. 
 | 
| bool | getValidationConstraintFatal () const | 
|  | This method returns the state of the parser's validation-constraint-fatal flag. 
 | 
| XMLCh * | getExternalSchemaLocation () const | 
|  | Get the set of Namespace/SchemaLocation that is specified externaly. 
 | 
| XMLCh * | getExternalNoNamespaceSchemaLocation () const | 
|  | Get the noNamespace SchemaLocation that is specified externaly. 
 | 
| SecurityManager * | getSecurityManager () const | 
|  | Get the SecurityManager instance attached to this parser. 
 | 
| bool | getLoadExternalDTD () const | 
|  | Get the 'Loading External DTD' flag. 
 | 
| bool | isCachingGrammarFromParse () const | 
|  | Get the 'Grammar caching' flag. 
 | 
| bool | isUsingCachedGrammarInParse () const | 
|  | Get the 'Use cached grammar' flag. 
 | 
| bool | getCalculateSrcOfs () const | 
|  | Get the 'calculate src offset flag'. 
 | 
| bool | getStandardUriConformant () const | 
|  | Get the 'force standard uri flag'. 
 | 
| Grammar * | getGrammar (const XMLCh *const nameSpaceKey) | 
|  | Retrieve the grammar that is associated with the specified namespace key. 
 | 
| Grammar * | getRootGrammar () | 
|  | Retrieve the grammar where the root element is declared. 
 | 
| const XMLCh * | getURIText (unsigned int uriId) const | 
|  | Returns the string corresponding to a URI id from the URI string pool. 
 | 
| unsigned int | getSrcOffset () const | 
|  | Returns the current src offset within the input source. 
 | 
| bool | getGenerateSyntheticAnnotations () const | 
|  | Get the 'generate synthetic annotations' flag. 
 | 
| bool | getValidateAnnotations () const | 
|  | Get the 'validate annotations' flag. 
 | 
| bool | getIgnoreCachedDTD () const | 
|  | Get the 'ignore cached DTD grammar' flag. 
 | 
| bool | getIgnoreAnnotations () const | 
|  | Get the 'ignore annotations' flag. 
 | 
| bool | getDisableDefaultEntityResolution () const | 
|  | Get the 'disable default entity resolution' flag. 
 | 
| bool | getSkipDTDValidation () const | 
|  | Get the 'skip DTD validation' flag. 
 | 
|  | 
| void | setGenerateSyntheticAnnotations (const bool newValue) | 
|  | set the 'generate synthetic annotations' flag 
 | 
| void | setValidateAnnotations (const bool newValue) | 
|  | set the 'validate annotations' flag 
 | 
| void | setDoNamespaces (const bool newState) | 
|  | This method allows users to enable or disable the parser's namespace processing. 
 | 
| void | setValidationScheme (const ValSchemes newScheme) | 
|  | This method allows users to set the validation scheme to be used by this parser. 
 | 
| void | setDoSchema (const bool newState) | 
|  | Set the 'schema support' flag. 
 | 
| void | setValidationSchemaFullChecking (const bool schemaFullChecking) | 
|  | This method allows the user to turn full Schema constraint checking on/off. 
 | 
| void | setIdentityConstraintChecking (const bool identityConstraintChecking) | 
|  | This method allows the user to turn identity constraint checking on/off. 
 | 
| void | setExitOnFirstFatalError (const bool newState) | 
|  | This method allows users to set the parser's behaviour when it encounters the first fatal error. 
 | 
| void | setValidationConstraintFatal (const bool newState) | 
|  | This method allows users to set the parser's behaviour when it encounters a validtion constraint error. 
 | 
| void | setExternalSchemaLocation (const XMLCh *const schemaLocation) | 
|  | This method allows the user to specify a list of schemas to use. 
 | 
| void | setExternalSchemaLocation (const char *const schemaLocation) | 
|  | This method is same as setExternalSchemaLocation(const XMLCh* const). 
 | 
| void | setExternalNoNamespaceSchemaLocation (const XMLCh *const noNamespaceSchemaLocation) | 
|  | This method allows the user to specify the no target namespace XML Schema Location externally. 
 | 
| void | setExternalNoNamespaceSchemaLocation (const char *const noNamespaceSchemaLocation) | 
|  | This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const). 
 | 
| void | setSecurityManager (SecurityManager *const securityManager) | 
|  | This allows an application to set a SecurityManager on the parser; this object stores information that various components use to limit their consumption of system resources while processing documents. 
 | 
| void | setLoadExternalDTD (const bool newState) | 
|  | Set the 'Loading External DTD' flag. 
 | 
| void | cacheGrammarFromParse (const bool newState) | 
|  | Set the 'Grammar caching' flag. 
 | 
| void | useCachedGrammarInParse (const bool newState) | 
|  | Set the 'Use cached grammar' flag. 
 | 
| void | setCalculateSrcOfs (const bool newState) | 
|  | Enable/disable src offset calculation. 
 | 
| void | setStandardUriConformant (const bool newState) | 
|  | Force standard uri. 
 | 
| void | useScanner (const XMLCh *const scannerName) | 
|  | Set the scanner to use when scanning the XML document. 
 | 
| void | setInputBufferSize (const size_t bufferSize) | 
|  | Set maximum input buffer size. 
 | 
| void | setIgnoreCachedDTD (const bool newValue) | 
|  | Set the 'ignore cached DTD grammar' flag. 
 | 
| void | setIgnoreAnnotations (const bool newValue) | 
|  | Set the 'ignore annotation' flag. 
 | 
| void | setDisableDefaultEntityResolution (const bool newValue) | 
|  | Set the 'disable default entity resolution' flag. 
 | 
| void | setSkipDTDValidation (const bool newValue) | 
|  | Set the 'skip DTD validation' flag. 
 | 
|  | 
| 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. 
 | 
| bool | removeAdvDocHandler (XMLDocumentHandler *const toRemove) | 
|  | This method removes the 'advanced' document handler callback from the underlying parser scanner. 
 | 
|  | 
| bool | parseFirst (const XMLCh *const systemId, XMLPScanToken &toFill) | 
|  | Begin a progressive parse operation. 
 | 
| bool | parseFirst (const char *const systemId, XMLPScanToken &toFill) | 
|  | Begin a progressive parse operation. 
 | 
| bool | parseFirst (const InputSource &source, XMLPScanToken &toFill) | 
|  | Begin a progressive parse operation. 
 | 
| bool | parseNext (XMLPScanToken &token) | 
|  | Continue a progressive parse operation. 
 | 
| void | parseReset (XMLPScanToken &token) | 
|  | Reset the parser after a progressive parse. 
 | 
|  | 
| Grammar * | loadGrammar (const InputSource &source, const short grammarType, const bool toCache=false) | 
|  | Preparse schema grammar (XML Schema, DTD, etc.) via an input source object. 
 | 
| Grammar * | loadGrammar (const XMLCh *const systemId, const short grammarType, const bool toCache=false) | 
|  | Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL. 
 | 
| Grammar * | loadGrammar (const char *const systemId, const short grammarType, const bool toCache=false) | 
|  | Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL. 
 | 
| void | resetCachedGrammarPool () | 
|  | This method allows the user to reset the pool of cached grammars. 
 | 
|  | 
| virtual void | parse (const InputSource &source) | 
|  | This method invokes the parsing process on the XML file specified by the InputSource parameter. 
 | 
| virtual void | parse (const XMLCh *const systemId) | 
|  | This method invokes the parsing process on the XML file specified by the Unicode string parameter 'systemId'. 
 | 
| virtual void | parse (const char *const systemId) | 
|  | This method invokes the parsing process on the XML file specified by the native char* string parameter 'systemId'. 
 | 
| virtual void | setDocumentHandler (DocumentHandler *const handler) | 
|  | This method installs the user specified SAX Document Handler callback function on parser. 
 | 
| virtual void | setDTDHandler (DTDHandler *const handler) | 
|  | This method installs the user specified DTD handler on the parser. 
 | 
| virtual void | setErrorHandler (ErrorHandler *const handler) | 
|  | This method installs the user specified error handler on the parser. 
 | 
| virtual void | setPSVIHandler (PSVIHandler *const handler) | 
|  | This method installs the user specified PSVI handler on the parser. 
 | 
| virtual void | setEntityResolver (EntityResolver *const resolver) | 
|  | This method installs the user specified entity resolver on the parser. 
 | 
| virtual void | setXMLEntityResolver (XMLEntityResolver *const resolver) | 
|  | This method installs the user specified entity resolver on the parser. 
 | 
|  | 
| 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. 
 | 
| virtual void | docComment (const XMLCh *const comment) | 
|  | This method is used to report any comments scanned by the parser. 
 | 
| virtual void | docPI (const XMLCh *const target, const XMLCh *const data) | 
|  | This method is used to report any PI scanned by the parser. 
 | 
| virtual void | endDocument () | 
|  | This method is used to indicate the end of root element was just scanned by the parser. 
 | 
| virtual void | endElement (const XMLElementDecl &elemDecl, const unsigned int urlId, const bool isRoot, const XMLCh *const elemPrefix) | 
|  | This method is used to indicate the end tag of an element. 
 | 
| virtual void | endEntityReference (const XMLEntityDecl &entDecl) | 
|  | This method is used to indicate that an end of an entity reference was just scanned. 
 | 
| 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'. 
 | 
| 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. 
 | 
| 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. 
 | 
| virtual void | startEntityReference (const XMLEntityDecl &entDecl) | 
|  | This method is used to indicate the start of an entity reference. 
 | 
| 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. 
 | 
|  | 
| 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 XMLSSize_t lineNum, const XMLSSize_t colNum) | 
|  | This method is used to report back errors found while parsing the XML file. 
 | 
| virtual void | resetErrors () | 
|  | This method allows the user installed Error Handler callback to 'reset' itself. 
 | 
|  | 
| virtual void | endInputSource (const InputSource &inputSource) | 
|  | This method is used to indicate the end of parsing of an external entity file. 
 | 
| 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. 
 | 
| virtual void | resetEntities () | 
|  | This method allows the installed XMLEntityHandler to reset itself. 
 | 
| virtual InputSource * | resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI=0) | 
|  | This method allows a user installed entity handler to further process any pointers to external entities. 
 | 
| virtual InputSource * | resolveEntity (XMLResourceIdentifier *resourceIdentifier) | 
|  | Resolve a public/system id. 
 | 
| virtual void | startInputSource (const InputSource &inputSource) | 
|  | This method is used to indicate the start of parsing an external entity file. 
 | 
|  | 
| virtual void | attDef (const DTDElementDecl &elemDecl, const DTDAttDef &attDef, const bool ignore) | 
|  | This method is used to report an attribute definition. 
 | 
| virtual void | doctypeComment (const XMLCh *const comment) | 
|  | This method is used to report a comment occurring within the DTD. 
 | 
| virtual void | doctypeDecl (const DTDElementDecl &elemDecl, const XMLCh *const publicId, const XMLCh *const systemId, const bool hasIntSubset, const bool hasExtSubset=false) | 
|  | This method is used to report the DOCTYPE declaration. 
 | 
| 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. 
 | 
| 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. 
 | 
| virtual void | elementDecl (const DTDElementDecl &decl, const bool isIgnored) | 
|  | This method is used to report an element declarations successfully scanned by the parser. 
 | 
| virtual void | endAttList (const DTDElementDecl &elemDecl) | 
|  | This method is used to report the end of an attribute list declaration for an element. 
 | 
| virtual void | endIntSubset () | 
|  | This method is used to report the end of the internal subset. 
 | 
| virtual void | endExtSubset () | 
|  | This method is used to report the end of the external subset. 
 | 
| virtual void | entityDecl (const DTDEntityDecl &entityDecl, const bool isPEDecl, const bool isIgnored) | 
|  | This method is used to report any entity declarations. 
 | 
| virtual void | resetDocType () | 
|  | This method allows the user installed DTD handler to reset itself. 
 | 
| virtual void | notationDecl (const XMLNotationDecl ¬Decl, const bool isIgnored) | 
|  | This method is used to report any notation declarations. 
 | 
| virtual void | startAttList (const DTDElementDecl &elemDecl) | 
|  | This method is used to indicate the start of an element's attribute list declaration. 
 | 
| virtual void | startIntSubset () | 
|  | This method is used indicate the start of the internal subset. 
 | 
| virtual void | startExtSubset () | 
|  | This method is used indicate the start of the external subset. 
 | 
| virtual void | TextDecl (const XMLCh *const versionStr, const XMLCh *const encodingStr) | 
|  | This method is used to report the TextDecl. 
 | 
|  | 
| bool | getDoValidation () const | 
|  | This method returns the state of the parser's validation handling flag which controls whether validation checks are enforced or not. 
 | 
| void | setDoValidation (const bool newState) | 
|  | This method allows users to enable or disable the parser's validation checks. 
 | 
| 
 Protected Member Functions | 
| const XMLScanner & | getScanner () const | 
|  | This method returns a reference to the underlying scanner object. 
 | 
| GrammarResolver * | getGrammarResolver () const | 
|  | Get the Grammar resolver. 
 | 
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.