abstractdomparser.hpp

来自「IBM的解析xml的工具Xerces的源代码」· HPP 代码 · 共 1,793 行 · 第 1/5 页

HPP
1,793
字号
      * @param cdataSection  A flag indicating if the characters represent      *                      content from the CDATA section.      */    virtual void docCharacters    (        const   XMLCh* const    chars        , const unsigned int    length        , const bool            cdataSection    );    /** Handle a document comment event      *      * This method is used to report any comments scanned by the parser.      * A new comment node is created which stores this data.      *      * @param comment A const pointer to a null terminated Unicode      *                string representing the comment text.      */    virtual void docComment    (        const   XMLCh* const    comment    );    /** Handle a document PI event      *      * This method is used to report any PI scanned by the parser. A new      * PI node is created and appended as a child of the current node in      * the tree.      *      * @param target A const pointer to a Unicode string representing the      *               target of the PI declaration.      * @param data   A const pointer to a Unicode string representing the      *               data of the PI declaration. See the PI production rule      *               in the XML specification for details.      */    virtual void docPI    (        const   XMLCh* const    target        , const XMLCh* const    data    );    /** Handle the end of document event      *      * This method is used to indicate the end of the current document.      */    virtual void endDocument();    /** Handle and end of element event      *      * This method is used to indicate the end tag of an element. The      * DOM parser pops the current element off the top of the element      * stack, and make it the new current element.      *      * @param elemDecl A const reference to the object containing element      *                 declaration information.      * @param urlId    An id referring to the namespace prefix, if      *                 namespaces setting is switched on.      * @param isRoot   A flag indicating whether this element was the      *                 root element.      * @param elemPrefix A const pointer to a Unicode string containing      *                 the namespace prefix for this element. Applicable      *                 only when namespace processing is enabled.      */    virtual void endElement    (        const   XMLElementDecl& elemDecl        , const unsigned int    urlId        , const bool            isRoot        , const XMLCh* const    elemPrefix    );    /** Handle and end of entity reference event      *      * This method is used to indicate that an end of an entity reference      * was just scanned.      *      * @param entDecl A const reference to the object containing the      *                entity declaration information.      */    virtual void endEntityReference    (        const   XMLEntityDecl&  entDecl    );    /** Handle an ignorable whitespace vent      *      * 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.      *      * Any whitespace before content is ignored. If the current node is      * already of type DOMNode::TEXT_NODE, then these whitespaces are      * appended, otherwise a new Text node is created which stores this      * data. Essentially all contiguous ignorable characters are collected      * in one node.      *      * @param chars   A const pointer to a Unicode string representing the      *                ignorable whitespace character data.      * @param length  The length of the Unicode string 'chars'.      * @param cdataSection  A flag indicating if the characters represent      *                      content from the CDATA section.      */    virtual void ignorableWhitespace    (        const   XMLCh* const    chars        , const unsigned int    length        , const bool            cdataSection    );    /** Handle a document reset event      *      * This method allows the user installed Document Handler to 'reset'      * itself, freeing all the memory resources. The scanner calls this      * method before starting a new parse event.      */    virtual void resetDocument();    /** Handle a start document event      *      * This method is used to report the start of the parsing process.      */    virtual void startDocument();    /** Handle a start element event      *      * 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. A new DOM Element node is created      * along with as many attribute nodes as required. This new element      * is added appended as a child of the current node in the tree, and      * then replaces it as the current node (if the isEmpty flag is false.)      *      * @param elemDecl A const reference to the object containing element      *                 declaration information.      * @param urlId    An id referring to the namespace prefix, if      *                 namespaces setting is switched on.      * @param elemPrefix A const pointer to a Unicode string containing      *                 the namespace prefix for this element. Applicable      *                 only when namespace processing is enabled.      * @param attrList A const reference to the object containing the      *                 list of attributes just scanned for this element.      * @param attrCount A count of number of attributes in the list      *                 specified by the parameter 'attrList'.      * @param isEmpty  A flag indicating whether this is an empty element      *                 or not. If empty, then no endElement() call will      *                 be made.      * @param isRoot   A flag indicating whether this element was the      *                 root element.      * @see DocumentHandler#startElement      */    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    );    /** Handle a start entity reference event      *      * This method is used to indicate the start of an entity reference.      * If the expand entity reference flag is true, then a new      * DOM Entity reference node is created.      *      * @param entDecl A const reference to the object containing the      *                entity declaration information.      */    virtual void startEntityReference    (        const   XMLEntityDecl&  entDecl    );    /** Handle an XMLDecl event      *      * This method is used to report the XML decl scanned by the parser.      * Refer to the XML specification to see the meaning of parameters.      *      * <b>This method is a no-op for this DOM      * implementation.</b>      *      * @param versionStr A const pointer to a Unicode string representing      *                   version string value.      * @param encodingStr A const pointer to a Unicode string representing      *                    the encoding string value.      * @param standaloneStr A const pointer to a Unicode string      *                      representing the standalone string value.      * @param actualEncStr A const pointer to a Unicode string      *                     representing the actual encoding string      *                     value.      */    virtual void XMLDecl    (        const   XMLCh* const    versionStr        , const XMLCh* const    encodingStr        , const XMLCh* const    standaloneStr        , const XMLCh* const    actualEncStr    );    /** Receive notification of the name and namespace of the type that validated       * the element corresponding to the most recent endElement event.      * This event will be fired immediately after the      * endElement() event that signifies the end of the element      * to which it applies; no other events will intervene.      * This method is <em>EXPERIMENTAL</em> and may change, disappear       * or become pure virtual at any time.      *      * This corresponds to a part of the information required by DOM Core      * level 3's TypeInfo interface.      *      * @param  typeName        local name of the type that actually validated      *                         the content of the element corresponding to the      *                         most recent endElement() callback      * @param  typeURI         namespace of the type that actually validated      *                         the content of the element corresponding to the      *                         most recent endElement() callback      * @deprecated      */    virtual void elementTypeInfo    (        const   XMLCh* const    typeName        , const XMLCh* const    typeURI    );    //@}    // -----------------------------------------------------------------------    //  Implementation of the deprecated DocTypeHandler interface.    // -----------------------------------------------------------------------    /** @name Deprecated DocTypeHandler Interfaces */    //@{    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        , const bool            hasExtSubset = false    );    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&    notDecl        , 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    );    //@}    // -----------------------------------------------------------------------    //  Deprecated Methods    // -----------------------------------------------------------------------    /** @name Deprecated Methods */    //@{    /**      * This method returns the state of the parser's validation      * handling flag which controls whether validation checks      * are enforced or not.      *      * @return true, if the parser is currently configured to      *         do validation, false otherwise.      *      * @see #setDoValidation      */    bool getDoValidation() const;    /**      * This method allows users to enable or disable the parser's validation      * checks.      *      * <p>By default, the parser does not to any validation. The default      * value is false.</p>      *      * @param newState The value specifying whether the parser should      *                 do validity checks or not against the DTD in the      *                 input XML document.      *      * @see #getDoValidation      */    void setDoValidation(const bool newState);    /** Get the 'expand entity references' flag.      * DEPRECATED Use getCreateEntityReferenceNodes() instead.      *      * This method returns the state of the parser's expand entity      * references flag.      *      * @return 'true' if the expand entity reference flag is set on      *         the parser, 'false' otherwise.      *      * @see #setExpandEntityReferences      * @see #setCreateEntityReferenceNodes      * @see #getCreateEntityReferenceNodes

⌨️ 快捷键说明

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