| API Docs for SAX and DOM |

- Main Page
- Classes
- Files
- Related Pages

# XMLDocumentHandler.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: XMLDocumentHandler.hpp 568078 2007-08-21 11:43:25Z amassari $
    00020  */
    00021
    00022
    00023 #if !defined(XMLDOCUMENTHANDLER_HPP)
    00024 #define XMLDOCUMENTHANDLER_HPP
    00025
    00026 #include <xercesc/util/XercesDefs.hpp>
    00027 #include <xercesc/util/RefVectorOf.hpp>
    00028 #include <xercesc/framework/XMLAttr.hpp>
    00029
    00030 XERCES_CPP_NAMESPACE_BEGIN
    00031
    00032 class XMLElementDecl;
    00033 class XMLEntityDecl;
    00034
    00043 class  XMLDocumentHandler
    00044 {
    00045 public:
    00046     // -----------------------------------------------------------------------
    00047     //  Constructors are hidden, just the virtual destructor is exposed
    00048     // -----------------------------------------------------------------------
    00051     virtual ~XMLDocumentHandler()
    00052     {
    00053     }
    00055
    00078     virtual void docCharacters
    00079     (
    00080         const   XMLCh* const    chars
    00081         , const unsigned int    length
    00082         , const bool            cdataSection
    00083     ) = 0;
    00084
    00092     virtual void docComment
    00093     (
    00094         const   XMLCh* const    comment
    00095     ) = 0;
    00096
    00106     virtual void docPI
    00107     (
    00108         const   XMLCh* const    target
    00109         , const XMLCh* const    data
    00110     ) = 0;
    00111
    00119     virtual void endDocument() = 0;
    00120
    00135     virtual void endElement
    00136     (
    00137         const   XMLElementDecl& elemDecl
    00138         , const unsigned int    uriId
    00139         , const bool            isRoot
    00140         , const XMLCh* const    prefixName = 0
    00141     ) = 0;
    00142
    00150     virtual void endEntityReference
    00151     (
    00152         const   XMLEntityDecl&  entDecl
    00153     ) = 0;
    00154
    00177     virtual void ignorableWhitespace
    00178     (
    00179         const   XMLCh* const    chars
    00180         , const unsigned int    length
    00181         , const bool            cdataSection
    00182     ) = 0;
    00183
    00190     virtual void resetDocument() = 0;
    00191
    00197     virtual void startDocument() = 0;
    00198
    00216     virtual void startElement
    00217     (
    00218         const   XMLElementDecl&         elemDecl
    00219         , const unsigned int            uriId
    00220         , const XMLCh* const            prefixName
    00221         , const RefVectorOf<XMLAttr>&   attrList
    00222         , const unsigned int            attrCount
    00223         , const bool                    isEmpty
    00224         , const bool                    isRoot
    00225     ) = 0;
    00226
    00234     virtual void startEntityReference(const XMLEntityDecl& entDecl) = 0;
    00235
    00253     virtual void XMLDecl
    00254     (
    00255         const   XMLCh* const    versionStr
    00256         , const XMLCh* const    encodingStr
    00257         , const XMLCh* const    standaloneStr
    00258         , const XMLCh* const    autoEncodingStr
    00259     ) = 0;
    00260
    00280     virtual void elementTypeInfo
    00281     (
    00282         const   XMLCh* const /* typeName */
    00283         , const XMLCh* const /* typeURI */
    00284     ) { /* non pure virtual to permit backward compatibility of implementations.  */  };
    00286
    00287
    00288
    00289 protected :
    00290     // -----------------------------------------------------------------------
    00291     //  Hidden Constructors
    00292     // -----------------------------------------------------------------------
    00293     XMLDocumentHandler()
    00294     {
    00295     }
    00296
    00297
    00298 private:
    00299     // -----------------------------------------------------------------------
    00300     //  Unimplemented constructors and operators
    00301     // -----------------------------------------------------------------------
    00302     XMLDocumentHandler(const XMLDocumentHandler&);
    00303     XMLDocumentHandler& operator=(const XMLDocumentHandler&);
    00304 };
    00305
    00306 XERCES_CPP_NAMESPACE_END
    00307
    00308 #endif

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