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

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