📄 abstractdomparser.hpp
字号:
* * If you exited because of an error, then this cleanup will be done * for you. Its only when you exit the file prematurely of your own * accord, because you've found what you wanted in the file most * likely. * * @param token A token maintaing state information to maintain * internal consistency between invocation of 'parseNext' * calls. * * @see #parseFirst(XMLCh*,...) * @see #parseFirst(char*,...) * @see #parseFirst(InputSource&,...) */ void parseReset(XMLPScanToken& token); //@} // ----------------------------------------------------------------------- // Implementation of the PSVIHandler interface. // ----------------------------------------------------------------------- /** @name Implementation of the PSVIHandler interface. */ //@{ /** Receive notification of the PSVI properties of an element. * The scanner will issue this call after the XMLDocumentHandler * endElement call. Since the scanner will issue the psviAttributes * call immediately after reading the start tag of an element, all element * content will be effectively bracketed by these two calls. * @param localName The name of the element whose end tag was just * parsed. * @param uri The namespace to which the element is bound * @param elementInfo Object containing the element's PSVI properties */ virtual void handleElementPSVI ( const XMLCh* const localName , const XMLCh* const uri , PSVIElement * elementInfo ); virtual void handlePartialElementPSVI ( const XMLCh* const localName , const XMLCh* const uri , PSVIElement * elementInfo ); /** * Enables PSVI information about attributes to be passed back to the * application. This callback will be made on *all* * elements; on elements with no attributes, the final parameter will * be null. * @param localName The name of the element upon which start tag * these attributes were encountered. * @param uri The namespace to which the element is bound * @param psviAttributes Object containing the attributes' PSVI properties * with information to identify them. */ virtual void handleAttributesPSVI ( const XMLCh* const localName , const XMLCh* const uri , PSVIAttributeList * psviAttributes ); //@} // ----------------------------------------------------------------------- // Implementation of the XMLDocumentHandler interface. // ----------------------------------------------------------------------- /** @name Implementation of the XMLDocumentHandler interface. */ //@{ /** Handle document character events * * This method is used to report all the characters scanned by the * parser. This DOM implementation stores this data in the appropriate * DOM node, creating one if necessary. * * @param chars A const pointer to a Unicode string representing the * character data. * @param length The length of the Unicode string returned in 'chars'. * @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 );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -