📄 handlerbase.hpp
字号:
*/ virtual void startDocument(); /** * Receive notification of the start of an element. * * <p>By default, do nothing. Application writers may override this * method in a subclass to take specific actions at the start of * each element (such as allocating a new tree node or writing * output to a file).</p> * * @param name The element type name. * @param attributes The specified or defaulted attributes. * @exception SAXException Any SAX exception, possibly * wrapping another exception. * @see DocumentHandler#startElement */ virtual void startElement ( const XMLCh* const name , AttributeList& attributes ); //@} /** @name Default implementation of the EntityResolver interface. */ //@{ /** * Resolve an external entity. * * <p>Always return null, so that the parser will use the system * identifier provided in the XML document. This method implements * the SAX default behaviour: application writers can override it * in a subclass to do special translations such as catalog lookups * or URI redirection.</p> * * @param publicId The public identifer, or null if none is * available. * @param systemId The system identifier provided in the XML * document. * @return The new input source, or null to require the * default behaviour. * The returned InputSource is owned by the parser which is * responsible to clean up the memory. * @exception SAXException Any SAX exception, possibly * wrapping another exception. * @see EntityResolver#resolveEntity */ virtual InputSource* resolveEntity ( const XMLCh* const publicId , const XMLCh* const systemId ); //@} /** @name Default implementation of the ErrorHandler interface */ //@{ /** * Receive notification of a recoverable parser error. * * <p>The default implementation does nothing. Application writers * may override this method in a subclass to take specific actions * for each error, such as inserting the message in a log file or * printing it to the console.</p> * * @param exc The warning information encoded as an exception. * @exception SAXException Any SAX exception, possibly * wrapping another exception. * @see ErrorHandler#warning * @see SAXParseException#SAXParseException */ virtual void error(const SAXParseException& exc); /** * Report a fatal XML parsing error. * * <p>The default implementation throws a SAXParseException. * Application writers may override this method in a subclass if * they need to take specific actions for each fatal error (such as * collecting all of the errors into a single report): in any case, * the application must stop all regular processing when this * method is invoked, since the document is no longer reliable, and * the parser may no longer report parsing events.</p> * * @param exc The error information encoded as an exception. * @exception SAXException Any SAX exception, possibly * wrapping another exception. * @see ErrorHandler#fatalError * @see SAXParseException#SAXParseException */ virtual void fatalError(const SAXParseException& exc); /** * Receive notification of a parser warning. * * <p>The default implementation does nothing. Application writers * may override this method in a subclass to take specific actions * for each warning, such as inserting the message in a log file or * printing it to the console.</p> * * @param exc The warning information encoded as an exception. * @exception SAXException Any SAX exception, possibly * wrapping another exception. * @see ErrorHandler#warning * @see SAXParseException#SAXParseException */ virtual void warning(const SAXParseException& exc); /** * Reset the Error handler object on its reuse * * @see ErrorHandler#resetErrors */ virtual void resetErrors(); //@} /** @name Default implementation of DTDHandler interface. */ //@{ /** * Receive notification of a notation declaration. * * <p>By default, do nothing. Application writers may override this * method in a subclass if they wish to keep track of the notations * declared in a document.</p> * * @param name The notation name. * @param publicId The notation public identifier, or null if not * available. * @param systemId The notation system identifier. * @see DTDHandler#notationDecl */ 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 ); //@} HandlerBase() {}; virtual ~HandlerBase() {};private: // ----------------------------------------------------------------------- // Unimplemented constructors and operators // ----------------------------------------------------------------------- HandlerBase(const HandlerBase&); HandlerBase& operator=(const HandlerBase&);};// ---------------------------------------------------------------------------// HandlerBase: Inline default implementations// ---------------------------------------------------------------------------inline void HandlerBase::characters(const XMLCh* const , const unsigned int){}inline void HandlerBase::endDocument(){}inline void HandlerBase::endElement(const XMLCh* const){}inline void HandlerBase::error(const SAXParseException&){}inline void HandlerBase::fatalError(const SAXParseException& exc){ throw exc;}inline voidHandlerBase::ignorableWhitespace( const XMLCh* const , const unsigned int){}inline void HandlerBase::notationDecl( const XMLCh* const , const XMLCh* const , const XMLCh* const){}inline voidHandlerBase::processingInstruction( const XMLCh* const , const XMLCh* const){}inline void HandlerBase::resetErrors(){}inline void HandlerBase::resetDocument(){}inline void HandlerBase::resetDocType(){}inline InputSource*HandlerBase::resolveEntity( const XMLCh* const , const XMLCh* const){ return 0;}inline voidHandlerBase::unparsedEntityDecl(const XMLCh* const , const XMLCh* const , const XMLCh* const , const XMLCh* const){}inline void HandlerBase::setDocumentLocator(const Locator* const){}inline void HandlerBase::startDocument(){}inline voidHandlerBase::startElement( const XMLCh* const , AttributeList&){}inline void HandlerBase::warning(const SAXParseException&){}XERCES_CPP_NAMESPACE_END#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -