📄 defaulthandler.hpp
字号:
virtual void notationDecl ( const XMLCh* const name , const XMLCh* const publicId , const XMLCh* const systemId ); /** * Reset the DTD object on its reuse * * @see DTDHandler#resetDocType */ virtual void resetDocType(); /** * Receive notification of an unparsed entity declaration. * * <p>By default, do nothing. Application writers may override this * method in a subclass to keep track of the unparsed entities * declared in a document.</p> * * @param name The entity name. * @param publicId The entity public identifier, or null if not * available. * @param systemId The entity system identifier. * @param notationName The name of the associated notation. * @see DTDHandler#unparsedEntityDecl */ virtual void unparsedEntityDecl ( const XMLCh* const name , const XMLCh* const publicId , const XMLCh* const systemId , const XMLCh* const notationName ); //@} /** @name Default implementation of LexicalHandler interface. */ //@{ /** * Receive notification of comments. * * <p>The Parser will call this method to report each occurence of * a comment in the XML document.</p> * * <p>The application must not attempt to read from the array * outside of the specified range.</p> * * @param chars The characters from the XML document. * @param length The number of characters to read from the array. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void comment ( const XMLCh* const chars , const unsigned int length ); /** * Receive notification of the end of a CDATA section. * * <p>The SAX parser will invoke this method at the end of * each CDATA parsed.</p> * * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void endCDATA (); /** * Receive notification of the end of the DTD declarations. * * <p>The SAX parser will invoke this method at the end of the * DTD</p> * * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void endDTD (); /** * Receive notification of the end of an entity. * * <p>The SAX parser will invoke this method at the end of an * entity</p> * * @param name The name of the entity that is ending. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void endEntity (const XMLCh* const name); /** * Receive notification of the start of a CDATA section. * * <p>The SAX parser will invoke this method at the start of * each CDATA parsed.</p> * * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void startCDATA (); /** * Receive notification of the start of the DTD declarations. * * <p>The SAX parser will invoke this method at the start of the * DTD</p> * * @param name The document type name. * @param publicId The declared public identifier for the external DTD subset, or null if none was declared. * @param systemId The declared system identifier for the external DTD subset, or null if none was declared. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void startDTD ( const XMLCh* const name , const XMLCh* const publicId , const XMLCh* const systemId ); /** * Receive notification of the start of an entity. * * <p>The SAX parser will invoke this method at the start of an * entity</p> * * @param name The name of the entity that is starting. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void startEntity (const XMLCh* const name); //@} /** @name Default implementation of DeclHandler interface. */ //@{ /** * Report an element type declaration. * * <p>The content model will consist of the string "EMPTY", the string * "ANY", or a parenthesised group, optionally followed by an occurrence * indicator. The model will be normalized so that all parameter entities * are fully resolved and all whitespace is removed,and will include the * enclosing parentheses. Other normalization (such as removing redundant * parentheses or simplifying occurrence indicators) is at the discretion * of the parser.</p> * * @param name The element type name. * @param model The content model as a normalized string. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void elementDecl ( const XMLCh* const name , const XMLCh* const model ); /** * Report an attribute type declaration. * * <p>Only the effective (first) declaration for an attribute will * be reported.</p> * * @param eName The name of the associated element. * @param aName The name of the attribute. * @param type A string representing the attribute type. * @param mode A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies. * @param value A string representing the attribute's default value, or null if there is none. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void attributeDecl ( const XMLCh* const eName , const XMLCh* const aName , const XMLCh* const type , const XMLCh* const mode , const XMLCh* const value ); /** * Report an internal entity declaration. * * <p>Only the effective (first) declaration for each entity will be * reported. All parameter entities in the value will be expanded, but * general entities will not.</p> * * @param name The name of the entity. If it is a parameter entity, the name will begin with '%'. * @param value The replacement text of the entity. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void internalEntityDecl ( const XMLCh* const name , const XMLCh* const value ); /** * Report a parsed external entity declaration. * * <p>Only the effective (first) declaration for each entity will * be reported.</p> * * @param name The name of the entity. If it is a parameter entity, the name will begin with '%'. * @param publicId The The declared public identifier of the entity, or null if none was declared. * @param systemId The declared system identifier of the entity. * @exception SAXException Any SAX exception, possibly * wrapping another exception. */ virtual void externalEntityDecl ( const XMLCh* const name , const XMLCh* const publicId , const XMLCh* const systemId ); //@} DefaultHandler() {}; virtual ~DefaultHandler() {};private: // ----------------------------------------------------------------------- // Unimplemented constructors and operators // ----------------------------------------------------------------------- DefaultHandler(const DefaultHandler&); DefaultHandler& operator=(const DefaultHandler&); };// ---------------------------------------------------------------------------// HandlerBase: Inline default implementations// ---------------------------------------------------------------------------inline void DefaultHandler::characters(const XMLCh* const ,const unsigned int){}inline void DefaultHandler::endDocument(){}inline void DefaultHandler::endElement(const XMLCh* const , const XMLCh* const , const XMLCh* const){}inline void DefaultHandler::error(const SAXParseException&){}inline void DefaultHandler::fatalError(const SAXParseException& exc){ throw exc;}inline voidDefaultHandler::ignorableWhitespace( const XMLCh* const , const unsigned int){}inline void DefaultHandler::notationDecl( const XMLCh* const , const XMLCh* const , const XMLCh* const){}inline voidDefaultHandler::processingInstruction( const XMLCh* const , const XMLCh* const){}inline void DefaultHandler::resetErrors(){}inline void DefaultHandler::resetDocument(){}inline void DefaultHandler::resetDocType(){}inline InputSource*DefaultHandler::resolveEntity( const XMLCh* const , const XMLCh* const){ return 0;}inline voidDefaultHandler::unparsedEntityDecl(const XMLCh* const , const XMLCh* const , const XMLCh* const , const XMLCh* const){}inline void DefaultHandler::setDocumentLocator(const Locator* const){}inline void DefaultHandler::startDocument(){}inline voidDefaultHandler::startElement( const XMLCh* const , const XMLCh* const , const XMLCh* const , const Attributes&){}inline void DefaultHandler::warning(const SAXParseException&){}inline void DefaultHandler::startPrefixMapping ( const XMLCh* const ,const XMLCh* const){}inline void DefaultHandler::endPrefixMapping ( const XMLCh* const){}inline void DefaultHandler::skippedEntity ( const XMLCh* const){}inline void DefaultHandler::comment( const XMLCh* const , const unsigned int){}inline void DefaultHandler::endCDATA (){}inline void DefaultHandler::endDTD (){}inline void DefaultHandler::endEntity (const XMLCh* const){}inline void DefaultHandler::startCDATA (){}inline void DefaultHandler::startDTD( const XMLCh* const , const XMLCh* const , const XMLCh* const){}inline void DefaultHandler::startEntity (const XMLCh* const){}inline void DefaultHandler::attributeDecl(const XMLCh* const, const XMLCh* const, const XMLCh* const, const XMLCh* const, const XMLCh* const){}inline void DefaultHandler::elementDecl(const XMLCh* const, const XMLCh* const){}inline void DefaultHandler::externalEntityDecl(const XMLCh* const, const XMLCh* const, const XMLCh* const){}inline void DefaultHandler::internalEntityDecl(const XMLCh* const, const XMLCh* const){}XERCES_CPP_NAMESPACE_END#endif // ! DEFAULTHANDLER_HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -