📄 abstractdomparser.hpp
字号:
*/ 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 'create comment node' flag * * This method returns the flag that specifies whether the parser is * creating comment nodes in the DOM tree being produced. * * @return The state of the create comment node flag. * @see #setCreateCommentNodes */ bool getCreateCommentNodes()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; /** * 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; //@} // ----------------------------------------------------------------------- // Setter methods // ----------------------------------------------------------------------- /** @name Setter methods */ //@{ /** Set the 'do namespaces' flag * * This method allows users to enable or disable the parser's * namespace processing. When set to true, parser starts enforcing * all the constraints and rules specified by the NameSpace * specification. * * The parser's default state is: false. * * @param newState The value specifying whether NameSpace rules should * be enforced or not. * * @see #getDoNamespaces */ void setDoNamespaces(const bool newState); /** Set the 'exit on first error' flag * * 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. * * @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); /** Set the 'include entity references' flag * * This method allows the user to specify whether the parser should * create entity reference nodes in the DOM tree being produced. * When the 'create' flag is * true, the parser will create EntityReference nodes in the DOM tree. * The EntityReference nodes and their child nodes will be read-only. * When the 'create' flag is false, no EntityReference nodes will be created. * <p>The replacement text * of the entity is included in either case, either as a * child of the Entity Reference node or in place at the location * of the reference. * <p>The default value is 'true'. * * @param create The new state of the create entity reference nodes * flag. * @see #getCreateEntityReferenceNodes */ void setCreateEntityReferenceNodes(const bool create); /** Set the 'include ignorable whitespace' flag * * This method allows the user to specify whether a validating parser * should include ignorable whitespaces as text nodes. It has no effect * on non-validating parsers which always include non-markup text. * <p>When set to true (also the default), ignorable whitespaces will be * added to the DOM tree as text nodes. The method * DOMText::isIgnorableWhitespace() will return true for those text * nodes only. * <p>When set to false, all ignorable whitespace will be discarded and * no text node is added to the DOM tree. Note: applications intended * to process the "xml:space" attribute should not set this flag to false. * And this flag also overrides any schema datateye whitespace facets, * that is, all ignorable whitespace will be discarded even though * 'preserve' is set in schema datatype whitespace facets. * * @param include The new state of the include ignorable whitespace * flag. * * @see #getIncludeIgnorableWhitespace */ void setIncludeIgnorableWhitespace(const bool include); /** * 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_Auto.</p> * * @param newScheme The new validation scheme to use. * * @see #getValidationScheme */ void setValidationScheme(const ValSchemes newScheme); /** Set the 'do schema' 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 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 * * @see #setExternalSchemaLocation(const XMLCh* const) */ void setExternalSchemaLocation(const char* const schemaLocation); /** * This method allows the user to specify the no target namespace XML * Schema Location externally. If specified, the instance document's * noNamespaceSchemaLocation attribute 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 the noNamespaceSchemaLocation attribute * that may occur in an instance document: e.g."file_name.xsd". * * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace * * @see #getExternalNoNamespaceSchemaLocation */ void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation); /** * This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const). * It takes native char string as parameter * * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace * * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const) */ void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation); /** * 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. * * If this method is called more than once, only the last one takes effect. * It may not be reset during a parse. * * * @param securityManager the SecurityManager instance to * be used by this parser * * @see #getSecurityManager */ void setSecurityManager(SecurityManager* const securityManager); /** Set the 'Loading External DTD' flag * * This method allows users to enable or disable the loading of external DTD. * When set to false, the parser will ignore any external DTD completely * if the validationScheme is set to Val_Never. * * The parser's default state is: true. * * This flag is ignored if the validationScheme is set to Val_Always or Val_Auto. * * @param newState The value specifying whether external DTD should * be loaded or not. * * @see #getLoadExternalDTD * @see #setValidationScheme */ void setLoadExternalDTD(const bool newState); /** Set the 'create comment nodes' flag *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -