| API Docs for SAX and DOM |

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

# DefaultHandler.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2000,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: DefaultHandler.hpp 208772 2005-07-01 16:48:15Z amassari $
    00019  */
    00020
    00021
    00022 #ifndef DEFAULTHANDLER_HPP
    00023 #define DEFAULTHANDLER_HPP
    00024
    00025 #include <xercesc/sax2/ContentHandler.hpp>
    00026 #include <xercesc/sax2/LexicalHandler.hpp>
    00027 #include <xercesc/sax2/DeclHandler.hpp>
    00028 #include <xercesc/sax/DTDHandler.hpp>
    00029 #include <xercesc/sax/EntityResolver.hpp>
    00030 #include <xercesc/sax/ErrorHandler.hpp>
    00031 #include <xercesc/sax/SAXParseException.hpp>
    00032
    00033 XERCES_CPP_NAMESPACE_BEGIN
    00034
    00035 class Locator;
    00036 class Attributes;
    00037
    00060 class  DefaultHandler :
    00061
    00062     public EntityResolver,
    00063     public DTDHandler,
    00064     public ContentHandler,
    00065     public ErrorHandler,
    00066     public LexicalHandler,
    00067     public DeclHandler
    00068 {
    00069 public:
    00087     virtual void characters
    00088     (
    00089         const   XMLCh* const    chars
    00090         , const unsigned int    length
    00091     );
    00092
    00105     virtual void endDocument();
    00106
    00122     virtual void endElement
    00123     (
    00124         const XMLCh* const uri,
    00125         const XMLCh* const localname,
    00126         const XMLCh* const qname
    00127     );
    00128
    00144     virtual void ignorableWhitespace
    00145     (
    00146         const   XMLCh* const    chars
    00147         , const unsigned int    length
    00148     );
    00149
    00165     virtual void processingInstruction
    00166     (
    00167         const   XMLCh* const    target
    00168         , const XMLCh* const    data
    00169     );
    00170
    00176     virtual void resetDocument();
    00178
    00193     virtual void setDocumentLocator(const Locator* const locator);
    00194
    00207     virtual void startDocument();
    00208
    00225     virtual void startElement
    00226     (
    00227         const   XMLCh* const    uri,
    00228         const   XMLCh* const    localname,
    00229         const   XMLCh* const    qname
    00230         , const Attributes& attrs
    00231     );
    00232
    00246     virtual void startPrefixMapping
    00247     (
    00248         const   XMLCh* const    prefix,
    00249         const   XMLCh* const    uri
    00250     ) ;
    00251
    00264     virtual void endPrefixMapping
    00265     (
    00266         const   XMLCh* const    prefix
    00267     ) ;
    00268
    00286     virtual void skippedEntity
    00287     (
    00288         const   XMLCh* const    name
    00289     ) ;
    00290
    00292
    00317     virtual InputSource* resolveEntity
    00318     (
    00319         const   XMLCh* const    publicId
    00320         , const XMLCh* const    systemId
    00321     );
    00322
    00324
    00341     virtual void error(const SAXParseException& exc);
    00342
    00360     virtual void fatalError(const SAXParseException& exc);
    00361
    00376     virtual void warning(const SAXParseException& exc);
    00377
    00383     virtual void resetErrors();
    00384
    00386
    00387
    00390
    00404     virtual void notationDecl
    00405     (
    00406         const   XMLCh* const    name
    00407         , const XMLCh* const    publicId
    00408         , const XMLCh* const    systemId
    00409     );
    00410
    00416     virtual void resetDocType();
    00417
    00432     virtual void unparsedEntityDecl
    00433     (
    00434         const   XMLCh* const    name
    00435         , const XMLCh* const    publicId
    00436         , const XMLCh* const    systemId
    00437         , const XMLCh* const    notationName
    00438     );
    00440
    00441
    00459     virtual void comment
    00460     (
    00461         const   XMLCh* const    chars
    00462         , const unsigned int    length
    00463     );
    00464
    00474     virtual void endCDATA ();
    00475
    00485     virtual void endDTD ();
    00486
    00497     virtual void endEntity (const XMLCh* const name);
    00498
    00508     virtual void startCDATA ();
    00509
    00522     virtual void startDTD
    00523     (
    00524         const   XMLCh* const    name
    00525         , const   XMLCh* const    publicId
    00526         , const   XMLCh* const    systemId
    00527     );
    00528
    00539     virtual void startEntity (const XMLCh* const name);
    00540
    00542
    00546
    00563     virtual void elementDecl
    00564     (
    00565         const   XMLCh* const    name
    00566         , const XMLCh* const    model
    00567     );
    00568
    00583     virtual void attributeDecl
    00584     (
    00585         const   XMLCh* const    eName
    00586         , const XMLCh* const    aName
    00587         , const XMLCh* const    type
    00588         , const XMLCh* const    mode
    00589         , const XMLCh* const    value
    00590     );
    00591
    00604     virtual void internalEntityDecl
    00605     (
    00606         const   XMLCh* const    name
    00607         , const XMLCh* const    value
    00608     );
    00609
    00622     virtual void externalEntityDecl
    00623     (
    00624         const   XMLCh* const    name
    00625         , const XMLCh* const    publicId
    00626         , const XMLCh* const    systemId
    00627     );
    00628
    00630
    00631     DefaultHandler() {};
    00632     virtual ~DefaultHandler() {};
    00633
    00634 private:
    00635     // -----------------------------------------------------------------------
    00636     //  Unimplemented constructors and operators
    00637     // -----------------------------------------------------------------------
    00638     DefaultHandler(const DefaultHandler&);
    00639     DefaultHandler& operator=(const DefaultHandler&);
    00640 };
    00641
    00642
    00643 // ---------------------------------------------------------------------------
    00644 //  HandlerBase: Inline default implementations
    00645 // ---------------------------------------------------------------------------
    00646 inline void DefaultHandler::characters(const   XMLCh* const
    00647                                        ,const   unsigned int)
    00648 {
    00649 }
    00650
    00651 inline void DefaultHandler::endDocument()
    00652 {
    00653 }
    00654
    00655 inline void DefaultHandler::endElement(const    XMLCh* const
    00656                                         , const XMLCh* const
    00657                                         , const XMLCh* const)
    00658 {
    00659 }
    00660
    00661 inline void DefaultHandler::error(const SAXParseException&)
    00662 {
    00663 }
    00664
    00665 inline void DefaultHandler::fatalError(const SAXParseException& exc)
    00666 {
    00667     throw exc;
    00668 }
    00669
    00670 inline void
    00671 DefaultHandler::ignorableWhitespace( const   XMLCh* const
    00672                                     , const unsigned int)
    00673 {
    00674 }
    00675
    00676 inline void DefaultHandler::notationDecl(  const   XMLCh* const
    00677                                             , const XMLCh* const
    00678                                             , const XMLCh* const)
    00679 {
    00680 }
    00681
    00682 inline void
    00683 DefaultHandler::processingInstruction( const   XMLCh* const
    00684                                         , const XMLCh* const)
    00685 {
    00686 }
    00687
    00688 inline void DefaultHandler::resetErrors()
    00689 {
    00690 }
    00691
    00692 inline void DefaultHandler::resetDocument()
    00693 {
    00694 }
    00695
    00696 inline void DefaultHandler::resetDocType()
    00697 {
    00698 }
    00699
    00700 inline InputSource*
    00701 DefaultHandler::resolveEntity( const   XMLCh* const
    00702                                 , const XMLCh* const)
    00703 {
    00704     return 0;
    00705 }
    00706
    00707 inline void
    00708 DefaultHandler::unparsedEntityDecl(const   XMLCh* const
    00709                                     , const XMLCh* const
    00710                                     , const XMLCh* const
    00711                                     , const XMLCh* const)
    00712 {
    00713 }
    00714
    00715 inline void DefaultHandler::setDocumentLocator(const Locator* const)
    00716 {
    00717 }
    00718
    00719 inline void DefaultHandler::startDocument()
    00720 {
    00721 }
    00722
    00723 inline void
    00724 DefaultHandler::startElement(  const     XMLCh* const
    00725                                 , const   XMLCh* const
    00726                                 , const   XMLCh* const
    00727                                 , const   Attributes&
    00728 )
    00729 {
    00730 }
    00731
    00732 inline void DefaultHandler::warning(const SAXParseException&)
    00733 {
    00734 }
    00735
    00736 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const
    00737                                                 ,const  XMLCh* const)
    00738 {
    00739 }
    00740
    00741 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const)
    00742 {
    00743 }
    00744
    00745 inline void DefaultHandler::skippedEntity ( const   XMLCh* const)
    00746 {
    00747 }
    00748
    00749 inline void DefaultHandler::comment(  const   XMLCh* const
    00750                                        , const unsigned int)
    00751 {
    00752 }
    00753
    00754 inline void DefaultHandler::endCDATA ()
    00755 {
    00756 }
    00757
    00758 inline void DefaultHandler::endDTD ()
    00759 {
    00760 }
    00761
    00762 inline void DefaultHandler::endEntity (const XMLCh* const)
    00763 {
    00764 }
    00765
    00766 inline void DefaultHandler::startCDATA ()
    00767 {
    00768 }
    00769
    00770 inline void DefaultHandler::startDTD(  const   XMLCh* const
    00771                                         , const   XMLCh* const
    00772                                         , const   XMLCh* const)
    00773 {
    00774 }
    00775
    00776 inline void DefaultHandler::startEntity (const XMLCh* const)
    00777 {
    00778 }
    00779
    00780 inline void DefaultHandler::attributeDecl(const XMLCh* const,
    00781                                           const XMLCh* const,
    00782                                           const XMLCh* const,
    00783                                           const XMLCh* const,
    00784                                           const XMLCh* const)
    00785 {
    00786 }
    00787
    00788 inline void DefaultHandler::elementDecl(const XMLCh* const,
    00789                                         const XMLCh* const)
    00790 {
    00791 }
    00792
    00793 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
    00794                                                const XMLCh* const,
    00795                                                const XMLCh* const)
    00796 {
    00797 }
    00798
    00799 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
    00800                                                const XMLCh* const)
    00801 {
    00802 }
    00803
    00804 XERCES_CPP_NAMESPACE_END
    00805
    00806 #endif // ! DEFAULTHANDLER_HPP

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.