⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saxparser.hpp

📁 开源xml解析库,非常有名
💻 HPP
📖 第 1 页 / 共 5 页
字号:
   /** 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.     * To be used only while parsing is in progress.     *     * @return offset within the input source     */    unsigned int getSrcOffset() const;    /** Get the 'generate synthetic annotations' flag      *          * @return true, if the parser is currently configured to      *         generate synthetic annotations, false otherwise.      *         A synthetic XSAnnotation is created when a schema      *         component has non-schema attributes but has no      *         child annotations so that the non-schema attributes      *         can be recovered under PSVI.      *      * @see #setGenerateSyntheticAnnotations      */    bool getGenerateSyntheticAnnotations() const;    /** Get the 'validate annotations' flag      *          * @return true, if the parser is currently configured to      *         validate annotations, false otherwise.      *      * @see #setValidateAnnotations      */    bool getValidateAnnotations() const;    /** Get the 'ignore cached DTD grammar' flag      *          * @return true, if the parser is currently configured to      *         ignore cached DTD, false otherwise.      *      * @see #setIgnoreCachedDTD      */    bool getIgnoreCachedDTD() const;    /** Get the 'ignore annotations' flag      *          * @return true, if the parser is currently configured to      *         ignore annotations, false otherwise.      *      * @see #setIgnoreAnnotations      */    bool getIgnoreAnnotations() const;    /** Get the 'disable default entity resolution' flag      *          * @return true, if the parser is currently configured to      *         not perform default entity resolution, false otherwise.      *      * @see #setDisableDefaultEntityResolution      */    bool getDisableDefaultEntityResolution() const;    /** Get the 'skip DTD validation' flag      *          * @return true, if the parser is currently configured to      *         skip DTD validation, false otherwise.      *      * @see #setSkipDTDValidation      */    bool getSkipDTDValidation() const;    //@}    // -----------------------------------------------------------------------    //  Setter methods    // -----------------------------------------------------------------------    /** @name Setter methods */    //@{    /** set the 'generate synthetic annotations' flag      *          * @param newValue The value for specifying whether Synthetic Annotations      *        should be generated or not.      *        A synthetic XSAnnotation is created when a schema      *        component has non-schema attributes but has no      *        child annotations.      *      * @see #getGenerateSyntheticAnnotations      */    void setGenerateSyntheticAnnotations(const bool newValue);    /** set the 'validate annotations' flag      *          * @param newValue The value for specifying whether annotations      *        should be validate or not.      *      * @see #getValidateAnnotations      */    void setValidateAnnotations(const bool newValue);    /**      * 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>      *      * @param newState The value specifying whether NameSpace rules should      *                 be enforced or not.      *      * @see #getDoNamespaces      */    void setDoNamespaces(const bool newState);    /**      * This method allows users to set the validation scheme to be used      * by this parser. The value is one of the ValSchemes enumerated values      * defined by this class:      *      * <br>  Val_Never  - turn off validation      * <br>  Val_Always - turn on validation      * <br>  Val_Auto   - turn on validation if any internal/external      *                  DTD subset have been seen      *      * <p>The parser's default state is: Val_Never.</p>      *      * @param newScheme The new validation scheme to use.      *      * @see #getValidationScheme      */    void setValidationScheme(const ValSchemes newScheme);    /** Set the 'schema support' flag      *      * This method allows users to enable or disable the parser's      * schema processing. When set to false, parser will not process      * any schema found.      *      * The parser's default state is: false.      *      * Note: If set to true, namespace processing must also be turned on.      *      * @param newState The value specifying whether schema support should      *                 be enforced or not.      *      * @see #getDoSchema      */    void setDoSchema(const bool newState);    /**      * This method allows the user to turn full Schema constraint checking on/off.      * Only takes effect if Schema validation is enabled.      * If turned off, partial constraint checking is done.      *      * Full schema constraint checking includes those checking that may      * be time-consuming or memory intensive. Currently, particle unique      * attribution constraint checking and particle derivation resriction checking      * are controlled by this option.      *      * The parser's default state is: false.      *      * @param schemaFullChecking True to turn on full schema constraint checking.      *      * @see #getValidationSchemaFullChecking      */    void setValidationSchemaFullChecking(const bool schemaFullChecking);    /**      * This method allows the user to turn identity constraint checking on/off.      * Only takes effect if Schema validation is enabled.      * If turned off, identity constraint checking is not done.      *      * The parser's default state is: true.      *      * @param identityConstraintChecking True to turn on identity constraint checking.      *      * @see #getIdentityConstraintChecking      */    void setIdentityConstraintChecking(const bool identityConstraintChecking);    /**      * 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.      *      * <p>The default value is 'true' and the parser exits on the      * first fatal error.</p>      *      * @param newState The value specifying whether the parser should      *                 continue or exit when it encounters the first      *                 fatal error.      *      * @see #getExitOnFirstFatalError      */    void setExitOnFirstFatalError(const bool newState);    /**      * 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 will treat validation error as fatal and will exit depends on the      * state of "getExitOnFirstFatalError". If false, then it will      * report the error and continue processing.      *      * Note: setting this true does not mean the validation error will be printed with      * the word "Fatal Error".   It is still printed as "Error", but the parser      * will exit if "setExitOnFirstFatalError" is set to true.      *      * <p>The default value is 'false'.</p>      *      * @param newState If true, the parser will exit if "setExitOnFirstFatalError"      *                 is set to true.      *      * @see #getValidationConstraintFatal      * @see #setExitOnFirstFatalError      */    void setValidationConstraintFatal(const bool newState);    /**      * This method allows the user to specify a list of schemas to use.      * If the targetNamespace of a schema specified using this method matches      * the targetNamespace of a schema occuring in the instance document in      * the schemaLocation attribute, or if the targetNamespace matches the      * namespace attribute of the "import" element, the schema specified by the      * user using this method will be used (i.e., the schemaLocation attribute      * in the instance document or on the "import" element will be effectively ignored).      *      * If this method is called more than once, only the last one takes effect.      *      * The syntax is the same as for schemaLocation attributes in instance      * documents: e.g, "http://www.example.com file_name.xsd". The user can      * specify more than one XML Schema in the list.      *      * @param schemaLocation the list of schemas to use      *      * @see #getExternalSchemaLocation      */    void setExternalSchemaLocation(const XMLCh* const schemaLocation);    /**      * This method is same as setExternalSchemaLocation(const XMLCh* const).      * It takes native char string as parameter      *      * @param schemaLocation the list of schemas to use      *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -