📄 saxparser.hpp
字号:
// Getter Methods // ----------------------------------------------------------------------- /** @name Getter methods */ //@{ /** * This method returns the installed document handler. Suitable * for 'lvalue' usages. * * @return The pointer to the installed document handler object. */ DocumentHandler* getDocumentHandler(); /** * This method returns the installed document handler. Suitable * only for 'rvalue' usages. * * @return A const pointer to the installed document handler object. */ const DocumentHandler* getDocumentHandler() const; /** * This method returns the installed entity resolver. Suitable * for 'lvalue' usages. * * @return The pointer to the installed entity resolver object. */ EntityResolver* getEntityResolver(); /** * This method returns the installed entity resolver. Suitable * for 'rvalue' usages. * * @return A const pointer to the installed entity resolver object. */ const EntityResolver* getEntityResolver() const; /** * This method returns the installed entity resolver. Suitable * for 'lvalue' usages. * * @return The pointer to the installed entity resolver object. */ XMLEntityResolver* getXMLEntityResolver(); /** * This method returns the installed entity resolver. Suitable * for 'rvalue' usages. * * @return A const pointer to the installed entity resolver object. */ const XMLEntityResolver* getXMLEntityResolver() const; /** * This method returns the installed error handler. Suitable * for 'lvalue' usages. * * @return The pointer to the installed error handler object. */ ErrorHandler* getErrorHandler(); /** * This method returns the installed error handler. Suitable * for 'rvalue' usages. * * @return A const pointer to the installed error handler object. */ const ErrorHandler* getErrorHandler() const; /** * This method returns the installed PSVI handler. Suitable * for 'lvalue' usages. * * @return The pointer to the installed PSVI handler object. */ PSVIHandler* getPSVIHandler(); /** * This method returns the installed PSVI handler. Suitable * for 'rvalue' usages. * * @return A const pointer to the installed PSVI handler object. */ const PSVIHandler* getPSVIHandler() const; /** * This method returns a reference to the parser's installed * validator. * * @return A const reference to the installed validator object. */ const XMLValidator& getValidator() const; /** * This method returns an enumerated value that indicates the current * validation scheme set on this parser. * * @return The ValSchemes value current set on this parser. * @see #setValidationScheme */ ValSchemes getValidationScheme() const; /** Get the 'do schema' flag * * This method returns the state of the parser's schema processing * flag. * * @return true, if the parser is currently configured to * understand schema, false otherwise. * * @see #setDoSchema */ bool getDoSchema() const; /** Get the 'full schema constraint checking' flag * * This method returns the state of the parser's full schema constraint * checking flag. * * @return true, if the parser is currently configured to * have full schema constraint checking, false otherwise. * * @see #setValidationSchemaFullChecking */ bool getValidationSchemaFullChecking() const; /** 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. * * @return number of errors encountered during the latest * parse operation. */ int getErrorCount() const; /** * This method returns the state of the parser's namespace * handling capability. * * @return true, if the parser is currently configured to * understand namespaces, false otherwise. * * @see #setDoNamespaces */ bool getDoNamespaces() const; /** * This method returns the state of the parser's * exit-on-First-Fatal-Error flag. * * @return true, if the parser is currently configured to * exit on the first fatal error, false otherwise. * * @see #setExitOnFirstFatalError */ bool getExitOnFirstFatalError() const; /** * This method returns the state of the parser's * validation-constraint-fatal flag. * * @return true, if the parser is currently configured to * set validation constraint errors as fatal, false * otherwise. * * @see #setValidationContraintFatal */ bool getValidationConstraintFatal() const; /** Get the set of Namespace/SchemaLocation that is specified externaly. * * This method returns the list of Namespace/SchemaLocation that was * specified using setExternalSchemaLocation. * * The parser owns the returned string, and the memory allocated for * the returned string 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. * * @return a pointer to the list of Namespace/SchemaLocation that was * specified externally. The pointer spans the same life-time as * the parser. A null pointer is returned if nothing * was specified externally. * * @see #setExternalSchemaLocation(const XMLCh* const) */ XMLCh* getExternalSchemaLocation() const; /** Get the noNamespace SchemaLocation that is specified externaly. * * This method returns the no target namespace XML Schema Location * that was specified using setExternalNoNamespaceSchemaLocation. * * The parser owns the returned string, and the memory allocated for * the returned string 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. * * @return a pointer to the no target namespace Schema Location that was * specified externally. The pointer spans the same life-time as * the parser. A null pointer is returned if nothing * was specified externally. * * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const) */ XMLCh* getExternalNoNamespaceSchemaLocation() const; /** Get the SecurityManager instance attached to this parser. * * This method returns the security manager * that was specified using setSecurityManager. * * The SecurityManager instance must have been specified by the application; * this should not be deleted until after the parser has been deleted (or * a new SecurityManager instance has been supplied to the parser). * * @return a pointer to the SecurityManager instance * specified externally. A null pointer is returned if nothing * was specified externally. * * @see #setSecurityManager(const SecurityManager* const) */ SecurityManager* getSecurityManager() const; /** Get the 'Loading External DTD' flag * * This method returns the state of the parser's loading external DTD * flag. * * @return false, if the parser is currently configured to * ignore external DTD completely, true otherwise. * * @see #setLoadExternalDTD * @see #getValidationScheme */ bool getLoadExternalDTD() const; /** Get the 'Grammar caching' flag * * This method returns the state of the parser's grammar caching when * parsing an XML document. * * @return true, if the parser is currently configured to * cache grammars, false otherwise. * * @see #cacheGrammarFromParse */ bool isCachingGrammarFromParse() const; /** Get the 'Use cached grammar' flag * * This method returns the state of the parser's use of cached grammar * when parsing an XML document. * * @return true, if the parser is currently configured to * use cached grammars, false otherwise. * * @see #useCachedGrammarInParse */ bool isUsingCachedGrammarInParse() const; /** * Get the 'calculate src offset flag' * * This method returns the state of the parser's src offset calculation * when parsing an XML document. * * @return true, if the parser is currently configured to * calculate src offsets, false otherwise. * * @see #setCalculateSrcOfs */ bool getCalculateSrcOfs() const; /** * Get the 'force standard uri flag' * * This method returns the state if the parser forces standard uri * * @return true, if the parser is currently configured to * force standard uri, i.e. malformed uri will be rejected. * * @see #setStandardUriConformant */ bool getStandardUriConformant() const; /** * Retrieve the grammar that is associated with the specified namespace key * * @param nameSpaceKey Namespace key * @return Grammar associated with the Namespace key. */ Grammar* getGrammar(const XMLCh* const nameSpaceKey); /** * Retrieve the grammar where the root element is declared. * * @return Grammar where root element declared */ Grammar* getRootGrammar(); /** * Returns the string corresponding to a URI id from the URI string pool. * * @param uriId id of the string in the URI string pool. * @return URI string corresponding to the URI id. */ const XMLCh* getURIText(unsigned int uriId) const; /** * Returns the current src offset within the input source. * * @return offset within the input source */ unsigned int getSrcOffset() const; //@} // ----------------------------------------------------------------------- // Setter methods // ----------------------------------------------------------------------- /** @name Setter methods */ //@{ /** * 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. * * <p>The parser's default state is: false.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -