| API Docs for SAX and DOM |

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XMLDocumentHandler.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   * $Log: XMLDocumentHandler.hpp,v $
    00019   * Revision 1.11  2004/09/20 15:00:49  amassari
    00020   * Added a setCreateSchemaInfo method to the DOM parsers, to store PSVI informations in element and attribute nodes
    00021   *
    00022   * Revision 1.10  2004/09/08 13:55:58  peiyongz
    00023   * Apache License Version 2.0
    00024   *
    00025   * Revision 1.9  2004/09/02 19:08:09  cargilld
    00026   * Fix API Doc warning message
    00027   *
    00028   * Revision 1.8  2004/02/25 18:29:16  amassari
    00029   * Fixed typo in documentation
    00030   *
    00031   * Revision 1.7  2004/01/29 11:46:29  cargilld
    00032   * Code cleanup changes to get rid of various compiler diagnostic messages.
    00033   *
    00034   * Revision 1.6  2003/11/28 05:14:34  neilg
    00035   * update XMLDocumentHandler to enable stateless passing of type information for elements.  Note that this is as yet unimplemented.
    00036   *
    00037   * Revision 1.5  2003/03/07 18:08:10  tng
    00038   * Return a reference instead of void for operator=
    00039   *
    00040   * Revision 1.4  2002/11/04 15:00:21  tng
    00041   * C++ Namespace Support.
    00042   *
    00043   * Revision 1.3  2002/05/28 20:41:11  tng
    00044   * [Bug 9104] prefixes dissapearing when schema validation turned on.
    00045   *
    00046   * Revision 1.2  2002/02/20 18:17:01  tng
    00047   * [Bug 5977] Warnings on generating apiDocs.
    00048   *
    00049   * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
    00050   * sane_include
    00051   *
    00052   * Revision 1.8  2000/03/02 19:54:24  roddey
    00053   * This checkin includes many changes done while waiting for the
    00054   * 1.1.0 code to be finished. I can't list them all here, but a list is
    00055   * available elsewhere.
    00056   *
    00057   * Revision 1.7  2000/02/24 20:00:23  abagchi
    00058   * Swat for removing Log from API docs
    00059   *
    00060   * Revision 1.6  2000/02/16 20:29:20  aruna1
    00061   * API Doc++ summary changes in
    00062   *
    00063   * Revision 1.5  2000/02/16 19:48:56  roddey
    00064   * More documentation updates
    00065   *
    00066   * Revision 1.4  2000/02/15 01:21:30  roddey
    00067   * Some initial documentation improvements. More to come...
    00068   *
    00069   * Revision 1.3  2000/02/09 19:47:27  abagchi
    00070   * Added docs for startElement
    00071   *
    00072   * Revision 1.2  2000/02/06 07:47:48  rahulj
    00073   * Year 2K copyright swat.
    00074   *
    00075   * Revision 1.1.1.1  1999/11/09 01:08:31  twl
    00076   * Initial checkin
    00077   *
    00078   * Revision 1.3  1999/11/08 20:44:37  rahul
    00079   * Swat for adding in Product name and CVS comment log variable.
    00080   *
    00081   */
    00082
    00083
    00084 #if !defined(XMLDOCUMENTHANDLER_HPP)
    00085 #define XMLDOCUMENTHANDLER_HPP
    00086
    00087 #include <xercesc/util/XercesDefs.hpp>
    00088 #include <xercesc/util/RefVectorOf.hpp>
    00089 #include <xercesc/framework/XMLAttr.hpp>
    00090
    00091 XERCES_CPP_NAMESPACE_BEGIN
    00092
    00093 class XMLElementDecl;
    00094 class XMLEntityDecl;
    00095
    00104 class  XMLDocumentHandler
    00105 {
    00106 public:
    00107     // -----------------------------------------------------------------------
    00108     //  Constructors are hidden, just the virtual destructor is exposed
    00109     // -----------------------------------------------------------------------
    00112     virtual ~XMLDocumentHandler()
    00113     {
    00114     }
    00116
    00139     virtual void docCharacters
    00140     (
    00141         const   XMLCh* const    chars
    00142         , const unsigned int    length
    00143         , const bool            cdataSection
    00144     ) = 0;
    00145
    00153     virtual void docComment
    00154     (
    00155         const   XMLCh* const    comment
    00156     ) = 0;
    00157
    00167     virtual void docPI
    00168     (
    00169         const   XMLCh* const    target
    00170         , const XMLCh* const    data
    00171     ) = 0;
    00172
    00180     virtual void endDocument() = 0;
    00181
    00196     virtual void endElement
    00197     (
    00198         const   XMLElementDecl& elemDecl
    00199         , const unsigned int    uriId
    00200         , const bool            isRoot
    00201         , const XMLCh* const    prefixName = 0
    00202     ) = 0;
    00203
    00211     virtual void endEntityReference
    00212     (
    00213         const   XMLEntityDecl&  entDecl
    00214     ) = 0;
    00215
    00238     virtual void ignorableWhitespace
    00239     (
    00240         const   XMLCh* const    chars
    00241         , const unsigned int    length
    00242         , const bool            cdataSection
    00243     ) = 0;
    00244
    00251     virtual void resetDocument() = 0;
    00252
    00258     virtual void startDocument() = 0;
    00259
    00277     virtual void startElement
    00278     (
    00279         const   XMLElementDecl&         elemDecl
    00280         , const unsigned int            uriId
    00281         , const XMLCh* const            prefixName
    00282         , const RefVectorOf<XMLAttr>&   attrList
    00283         , const unsigned int            attrCount
    00284         , const bool                    isEmpty
    00285         , const bool                    isRoot
    00286     ) = 0;
    00287
    00295     virtual void startEntityReference(const XMLEntityDecl& entDecl) = 0;
    00296
    00314     virtual void XMLDecl
    00315     (
    00316         const   XMLCh* const    versionStr
    00317         , const XMLCh* const    encodingStr
    00318         , const XMLCh* const    standaloneStr
    00319         , const XMLCh* const    autoEncodingStr
    00320     ) = 0;
    00321
    00341     virtual void elementTypeInfo
    00342     (
    00343         const   XMLCh* const /* typeName */
    00344         , const XMLCh* const /* typeURI */
    00345     ) { /* non pure virtual to permit backward compatibility of implementations.  */  };
    00347
    00348
    00349
    00350 protected :
    00351     // -----------------------------------------------------------------------
    00352     //  Hidden Constructors
    00353     // -----------------------------------------------------------------------
    00354     XMLDocumentHandler()
    00355     {
    00356     }
    00357
    00358
    00359 private:
    00360     // -----------------------------------------------------------------------
    00361     //  Unimplemented constructors and operators
    00362     // -----------------------------------------------------------------------
    00363     XMLDocumentHandler(const XMLDocumentHandler&);
    00364     XMLDocumentHandler& operator=(const XMLDocumentHandler&);
    00365 };
    00366
    00367 XERCES_CPP_NAMESPACE_END
    00368
    00369 #endif

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