http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

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

SAXParser.hpp

Go to the documentation of this file.
00001 /*
00002  * The Apache Software License, Version 1.1
00003  *
00004  * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
00005  * reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  *
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in
00016  *    the documentation and/or other materials provided with the
00017  *    distribution.
00018  *
00019  * 3. The end-user documentation included with the redistribution,
00020  *    if any, must include the following acknowledgment:
00021  *       "This product includes software developed by the
00022  *        Apache Software Foundation (http://www.apache.org/)."
00023  *    Alternately, this acknowledgment may appear in the software itself,
00024  *    if and wherever such third-party acknowledgments normally appear.
00025  *
00026  * 4. The names "Xerces" and "Apache Software Foundation" must
00027  *    not be used to endorse or promote products derived from this
00028  *    software without prior written permission. For written
00029  *    permission, please contact apache\@apache.org.
00030  *
00031  * 5. Products derived from this software may not be called "Apache",
00032  *    nor may "Apache" appear in their name, without prior written
00033  *    permission of the Apache Software Foundation.
00034  *
00035  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00036  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00037  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00038  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00039  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00040  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00041  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00042  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00043  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00044  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00045  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00046  * SUCH DAMAGE.
00047  * ====================================================================
00048  *
00049  * This software consists of voluntary contributions made by many
00050  * individuals on behalf of the Apache Software Foundation, and was
00051  * originally based on software copyright (c) 1999, International
00052  * Business Machines, Inc., http://www.ibm.com .  For more information
00053  * on the Apache Software Foundation, please see
00054  * <http://www.apache.org/>.
00055  */
00056 
00057 /*
00058  * $Log: SAXParser.hpp,v $
00059  * Revision 1.13  2002/08/14 15:20:38  knoaman
00060  * [Bug 3111] Problem with LexicalHandler::startDTD() and LexicalHandler::endDTD().
00061  *
00062  * Revision 1.12  2002/07/11 18:27:03  knoaman
00063  * Grammar caching/preparsing - initial implementation.
00064  *
00065  * Revision 1.11  2002/06/27 18:48:04  tng
00066  * API Documentation Update and move getScanner as protected
00067  *
00068  * Revision 1.10  2002/06/17 15:41:44  tng
00069  * Update API Documentation
00070  *
00071  * Revision 1.9  2002/06/06 20:38:18  tng
00072  * Document Fix: document that the returned object from resolveEntity is owned by the parser
00073  *
00074  * Revision 1.8  2002/05/31 15:13:53  tng
00075  * Fix doxygen documentation.
00076  *
00077  * Revision 1.7  2002/05/30 16:39:06  knoaman
00078  * DOM L3 LS.
00079  *
00080  * Revision 1.6  2002/05/30 16:20:09  tng
00081  * Add feature to optionally ignore external DTD.
00082  *
00083  * Revision 1.5  2002/05/29 21:37:47  knoaman
00084  * Add baseURI to resolveEntity to support DOMInputSource.
00085  *
00086  * Revision 1.4  2002/05/28 20:44:14  tng
00087  * [Bug 9104] prefixes dissapearing when schema validation turned on.
00088  *
00089  * Revision 1.3  2002/05/27 18:39:21  tng
00090  * To get ready for 64 bit large file, use XMLSSize_t to represent line and column number.
00091  *
00092  * Revision 1.2  2002/02/20 18:17:01  tng
00093  * [Bug 5977] Warnings on generating apiDocs.
00094  *
00095  * Revision 1.1.1.1  2002/02/01 22:22:07  peiyongz
00096  * sane_include
00097  *
00098  * Revision 1.22  2001/12/05 22:09:02  tng
00099  * Update documentation for setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation.
00100  *
00101  * Revision 1.21  2001/11/20 18:51:44  tng
00102  * Schema: schemaLocation and noNamespaceSchemaLocation to be specified outside the instance document.  New methods setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation are added (for SAX2, two new properties are added).
00103  *
00104  * Revision 1.20  2001/08/01 19:11:02  tng
00105  * Add full schema constraint checking flag to the samples and the parser.
00106  *
00107  * Revision 1.19  2001/07/27 20:24:21  tng
00108  * put getScanner() back as they were there before, not to break existing apps.
00109  *
00110  * Revision 1.18  2001/07/16 12:52:09  tng
00111  * APIDocs fix: default for schema processing in DOMParser, IDOMParser, and SAXParser should be false.
00112  *
00113  * Revision 1.17  2001/06/23 14:13:16  tng
00114  * Remove getScanner from the Parser headers as this is not needed and Scanner is not internal class.
00115  *
00116  * Revision 1.16  2001/06/03 19:26:20  jberry
00117  * Add support for querying error count following parse; enables simple parse without requiring error handler.
00118  *
00119  * Revision 1.15  2001/05/11 13:26:22  tng
00120  * Copyright update.
00121  *
00122  * Revision 1.14  2001/05/03 19:09:25  knoaman
00123  * Support Warning/Error/FatalError messaging.
00124  * Validity constraints errors are treated as errors, with the ability by user to set
00125  * validity constraints as fatal errors.
00126  *
00127  * Revision 1.13  2001/03/30 16:46:57  tng
00128  * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense.
00129  *
00130  * Revision 1.12  2001/03/21 21:56:09  tng
00131  * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
00132  *
00133  * Revision 1.11  2001/02/15 15:56:29  tng
00134  * Schema: Add setSchemaValidation and getSchemaValidation for DOMParser and SAXParser.
00135  * Add feature "http://apache.org/xml/features/validation/schema" for SAX2XMLReader.
00136  * New data field  fSchemaValidation in XMLScanner as the flag.
00137  *
00138  * Revision 1.10  2001/01/12 21:23:41  tng
00139  * Documentation Enhancement: explain values of Val_Scheme
00140  *
00141  * Revision 1.9  2000/08/02 18:05:15  jpolast
00142  * changes required for sax2
00143  * (changed private members to protected)
00144  *
00145  * Revision 1.8  2000/04/12 22:58:30  roddey
00146  * Added support for 'auto validate' mode.
00147  *
00148  * Revision 1.7  2000/03/03 01:29:34  roddey
00149  * Added a scanReset()/parseReset() method to the scanner and
00150  * parsers, to allow for reset after early exit from a progressive parse.
00151  * Added calls to new Terminate() call to all of the samples. Improved
00152  * documentation in SAX and DOM parsers.
00153  *
00154  * Revision 1.6  2000/02/17 03:54:27  rahulj
00155  * Added some new getters to query the parser state and
00156  * clarified the documentation.
00157  *
00158  * Revision 1.5  2000/02/16 03:42:58  rahulj
00159  * Finished documenting the SAX Driver implementation.
00160  *
00161  * Revision 1.4  2000/02/15 04:47:37  rahulj
00162  * Documenting the SAXParser framework. Not done yet.
00163  *
00164  * Revision 1.3  2000/02/06 07:47:56  rahulj
00165  * Year 2K copyright swat.
00166  *
00167  * Revision 1.2  1999/12/15 19:57:48  roddey
00168  * Got rid of redundant 'const' on boolean return value. Some compilers choke
00169  * on this and its useless.
00170  *
00171  * Revision 1.1.1.1  1999/11/09 01:07:51  twl
00172  * Initial checkin
00173  *
00174  * Revision 1.6  1999/11/08 20:44:54  rahul
00175  * Swat for adding in Product name and CVS comment log variable.
00176  *
00177  */
00178 
00179 #if !defined(SAXPARSER_HPP)
00180 #define SAXPARSER_HPP
00181 
00182 #include <xercesc/sax/Parser.hpp>
00183 #include <xercesc/internal/VecAttrListImpl.hpp>
00184 #include <xercesc/framework/XMLDocumentHandler.hpp>
00185 #include <xercesc/framework/XMLElementDecl.hpp>
00186 #include <xercesc/framework/XMLEntityHandler.hpp>
00187 #include <xercesc/framework/XMLErrorReporter.hpp>
00188 #include <xercesc/validators/DTD/DocTypeHandler.hpp>
00189 
00190 class DocumentHandler;
00191 class EntityResolver;
00192 class XMLPScanToken;
00193 class XMLScanner;
00194 class XMLValidator;
00195 class Grammar;
00196 
00197 
00207 
00208 class  SAXParser :
00209 
00210     public Parser
00211     , public XMLDocumentHandler
00212     , public XMLErrorReporter
00213     , public XMLEntityHandler
00214     , public DocTypeHandler
00215 {
00216 public :
00217     // -----------------------------------------------------------------------
00218     //  Class types
00219     // -----------------------------------------------------------------------
00227 
00228     enum ValSchemes
00229     {
00230         Val_Never
00231         , Val_Always
00232         , Val_Auto
00233     };
00234 
00235 
00236     // -----------------------------------------------------------------------
00237     //  Constructors and Destructor
00238     // -----------------------------------------------------------------------
00241     /** Constructor with an instance of validator class to use for
00242       * validation.
00243       * @param valToAdopt Pointer to the validator instance to use. The
00244       *                   parser is responsible for freeing the memory.
00245       */
00246     SAXParser(XMLValidator* const valToAdopt = 0);
00247 
00251     ~SAXParser();
00253 
00254 
00255     // -----------------------------------------------------------------------
00256     //  Getter Methods
00257     // -----------------------------------------------------------------------
00260 
00266     DocumentHandler* getDocumentHandler();
00267 
00274     const DocumentHandler* getDocumentHandler() const;
00275 
00282     EntityResolver* getEntityResolver();
00283 
00290     const EntityResolver* getEntityResolver() const;
00291 
00298     ErrorHandler* getErrorHandler();
00299 
00306     const ErrorHandler* getErrorHandler() const;
00307 
00314     const XMLValidator& getValidator() const;
00315 
00323     ValSchemes getValidationScheme() const;
00324 
00335     bool getDoSchema() const;
00336 
00347     bool getValidationSchemaFullChecking() const;
00348 
00359     int getErrorCount() const;
00360 
00370     bool getDoNamespaces() const;
00371 
00381     bool getExitOnFirstFatalError() const;
00382 
00393     bool getValidationConstraintFatal() const;
00394 
00414     XMLCh* getExternalSchemaLocation() const;
00415 
00435     XMLCh* getExternalNoNamespaceSchemaLocation() const;
00436 
00448     bool getLoadExternalDTD() const;
00449 
00460     bool isCachingGrammarFromParse() const;
00461 
00472     bool isUsingCachedGrammarInParse() const;
00473 
00480     Grammar* getGrammar(const XMLCh* const nameSpaceKey);
00481 
00487     Grammar* getRootGrammar();
00488     
00495     const XMLCh* getURIText(unsigned int uriId);
00496 
00498 
00499 
00500     // -----------------------------------------------------------------------
00501     //  Setter methods
00502     // -----------------------------------------------------------------------
00503 
00506 
00519     void setDoNamespaces(const bool newState);
00520 
00537     void setValidationScheme(const ValSchemes newScheme);
00538 
00554     void setDoSchema(const bool newState);
00555 
00572     void setValidationSchemaFullChecking(const bool schemaFullChecking);
00573 
00589     void setExitOnFirstFatalError(const bool newState);
00590 
00610     void setValidationConstraintFatal(const bool newState);
00611 
00631 
00632     void setExternalSchemaLocation(const XMLCh* const schemaLocation);
00633 
00642     void setExternalSchemaLocation(const char* const schemaLocation);
00643 
00658     void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
00659 
00668     void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
00669 
00686     void setLoadExternalDTD(const bool newState);
00687 
00705     void cacheGrammarFromParse(const bool newState);
00706 
00725     void useCachedGrammarInParse(const bool newState);
00726 
00727 
00729 
00730 
00731     // -----------------------------------------------------------------------
00732     //  Advanced document handler list maintenance methods
00733     // -----------------------------------------------------------------------
00734 
00737 
00750     void installAdvDocHandler(XMLDocumentHandler* const toInstall);
00751 
00761     bool removeAdvDocHandler(XMLDocumentHandler* const toRemove);
00763 
00764 
00765     // -----------------------------------------------------------------------
00766     //  Progressive scan methods
00767     // -----------------------------------------------------------------------
00768 
00771 
00799     bool parseFirst
00800     (
00801         const   XMLCh* const    systemId
00802         ,       XMLPScanToken&  toFill
00803     );
00804 
00832     bool parseFirst
00833     (
00834         const   char* const     systemId
00835         ,       XMLPScanToken&  toFill
00836     );
00837 
00865     bool parseFirst
00866     (
00867         const   InputSource&    source
00868         ,       XMLPScanToken&  toFill
00869     );
00870 
00895     bool parseNext(XMLPScanToken& token);
00896 
00918     void parseReset(XMLPScanToken& token);
00919 
00921 
00922     // -----------------------------------------------------------------------
00923     //  Grammar preparsing interface
00924     // -----------------------------------------------------------------------
00925 
00928 
00955     Grammar* loadGrammar(const InputSource& source,
00956                          const short grammarType,
00957                          const bool toCache = false);
00958 
00984     Grammar* loadGrammar(const XMLCh* const systemId,
00985                          const short grammarType,
00986                          const bool toCache = false);
00987 
01012     Grammar* loadGrammar(const char* const systemId,
01013                          const short grammarType,
01014                          const bool toCache = false);
01015 
01019     void resetCachedGrammarPool();
01020 
01022 
01023 
01024     // -----------------------------------------------------------------------
01025     //  Implementation of the SAX Parser interface
01026     // -----------------------------------------------------------------------
01027 
01030 
01039     virtual void parse(const InputSource& source);
01040 
01050     virtual void parse(const XMLCh* const systemId);
01051 
01059     virtual void parse(const char* const systemId);
01060 
01071     virtual void setDocumentHandler(DocumentHandler* const handler);
01072 
01082     virtual void setDTDHandler(DTDHandler* const handler);
01083 
01094     virtual void setErrorHandler(ErrorHandler* const handler);
01095 
01107     virtual void setEntityResolver(EntityResolver* const resolver);
01109 
01110 
01111     // -----------------------------------------------------------------------
01112     //  Implementation of the XMLDocumentHandler interface
01113     // -----------------------------------------------------------------------
01114 
01117 
01132     virtual void docCharacters
01133     (
01134         const   XMLCh* const    chars
01135         , const unsigned int    length
01136         , const bool            cdataSection
01137     );
01138 
01148     virtual void docComment
01149     (
01150         const   XMLCh* const    comment
01151     );
01152 
01172     virtual void docPI
01173     (
01174         const   XMLCh* const    target
01175         , const XMLCh* const    data
01176     );
01177 
01189     virtual void endDocument();
01190 
01210     virtual void endElement
01211     (
01212         const   XMLElementDecl& elemDecl
01213         , const unsigned int    urlId
01214         , const bool            isRoot
01215         , const XMLCh* const    elemPrefix
01216     );
01217 
01228     virtual void endEntityReference
01229     (
01230         const   XMLEntityDecl&  entDecl
01231     );
01232 
01252     virtual void ignorableWhitespace
01253     (
01254         const   XMLCh* const    chars
01255         , const unsigned int    length
01256         , const bool            cdataSection
01257     );
01258 
01263     virtual void resetDocument();
01264 
01275     virtual void startDocument();
01276 
01303     virtual void startElement
01304     (
01305         const   XMLElementDecl&         elemDecl
01306         , const unsigned int            urlId
01307         , const XMLCh* const            elemPrefix
01308         , const RefVectorOf<XMLAttr>&   attrList
01309         , const unsigned int            attrCount
01310         , const bool                    isEmpty
01311         , const bool                    isRoot
01312     );
01313 
01323     virtual void startEntityReference
01324     (
01325         const   XMLEntityDecl&  entDecl
01326     );
01327 
01345     virtual void XMLDecl
01346     (
01347         const   XMLCh* const    versionStr
01348         , const XMLCh* const    encodingStr
01349         , const XMLCh* const    standaloneStr
01350         , const XMLCh* const    actualEncodingStr
01351     );
01353 
01354 
01355     // -----------------------------------------------------------------------
01356     //  Implementation of the XMLErrorReporter interface
01357     // -----------------------------------------------------------------------
01358 
01361 
01384     virtual void error
01385     (
01386         const   unsigned int                errCode
01387         , const XMLCh* const                msgDomain
01388         , const XMLErrorReporter::ErrTypes  errType
01389         , const XMLCh* const                errorText
01390         , const XMLCh* const                systemId
01391         , const XMLCh* const                publicId
01392         , const XMLSSize_t                  lineNum
01393         , const XMLSSize_t                  colNum
01394     );
01395 
01404     virtual void resetErrors();
01406 
01407 
01408     // -----------------------------------------------------------------------
01409     //  Implementation of the XMLEntityHandler interface
01410     // -----------------------------------------------------------------------
01411 
01414 
01425     virtual void endInputSource(const InputSource& inputSource);
01426 
01441     virtual bool expandSystemId
01442     (
01443         const   XMLCh* const    systemId
01444         ,       XMLBuffer&      toFill
01445     );
01446 
01454     virtual void resetEntities();
01455 
01476     virtual InputSource* resolveEntity
01477     (
01478         const   XMLCh* const    publicId
01479         , const XMLCh* const    systemId
01480         , const XMLCh* const    baseURI = 0
01481     );
01482 
01494     virtual void startInputSource(const InputSource& inputSource);
01496 
01497 
01498     // -----------------------------------------------------------------------
01499     //  Implementation of the Deprecated DocTypeHandler Interface
01500     // -----------------------------------------------------------------------
01503 
01517     virtual void attDef
01518     (
01519         const   DTDElementDecl& elemDecl
01520         , const DTDAttDef&      attDef
01521         , const bool            ignore
01522     );
01523 
01533     virtual void doctypeComment
01534     (
01535         const   XMLCh* const    comment
01536     );
01537 
01556     virtual void doctypeDecl
01557     (
01558         const   DTDElementDecl& elemDecl
01559         , const XMLCh* const    publicId
01560         , const XMLCh* const    systemId
01561         , const bool            hasIntSubset
01562         , const bool            hasExtSubset = false
01563     );
01564 
01578     virtual void doctypePI
01579     (
01580         const   XMLCh* const    target
01581         , const XMLCh* const    data
01582     );
01583 
01595     virtual void doctypeWhitespace
01596     (
01597         const   XMLCh* const    chars
01598         , const unsigned int    length
01599     );
01600 
01613     virtual void elementDecl
01614     (
01615         const   DTDElementDecl& decl
01616         , const bool            isIgnored
01617     );
01618 
01629     virtual void endAttList
01630     (
01631         const   DTDElementDecl& elemDecl
01632     );
01633 
01640     virtual void endIntSubset();
01641 
01648     virtual void endExtSubset();
01649 
01664     virtual void entityDecl
01665     (
01666         const   DTDEntityDecl&  entityDecl
01667         , const bool            isPEDecl
01668         , const bool            isIgnored
01669     );
01670 
01675     virtual void resetDocType();
01676 
01689     virtual void notationDecl
01690     (
01691         const   XMLNotationDecl&    notDecl
01692         , const bool                isIgnored
01693     );
01694 
01705     virtual void startAttList
01706     (
01707         const   DTDElementDecl& elemDecl
01708     );
01709 
01716     virtual void startIntSubset();
01717 
01724     virtual void startExtSubset();
01725 
01738     virtual void TextDecl
01739     (
01740         const   XMLCh* const    versionStr
01741         , const XMLCh* const    encodingStr
01742     );
01744 
01745 
01746     // -----------------------------------------------------------------------
01747     //  Deprecated Methods
01748     // -----------------------------------------------------------------------
01751 
01761     bool getDoValidation() const;
01762 
01776     void setDoValidation(const bool newState);
01778 
01779 
01780 protected :
01781     // -----------------------------------------------------------------------
01782     //  Protected Methods
01783     // -----------------------------------------------------------------------
01790     const XMLScanner& getScanner() const;
01791 
01792 
01793 private:
01794     // -----------------------------------------------------------------------
01795     //  Unimplemented constructors and operators
01796     // -----------------------------------------------------------------------
01797     SAXParser(const SAXParser&);
01798     void operator=(const SAXParser&);
01799 
01800 
01801     // -----------------------------------------------------------------------
01802     //  Private data members
01803     //
01804     //  fAttrList
01805     //      A temporary implementation of the basic SAX attribute list
01806     //      interface. We use this one over and over on each startElement
01807     //      event to allow SAX-like access to the element attributes.
01808     //
01809     //  fDocHandler
01810     //      The installed SAX doc handler, if any. Null if none.
01811     //
01812     //  fDTDHandler
01813     //      The installed SAX DTD handler, if any. Null if none.
01814     //
01815     //  fElemDepth
01816     //      This is used to track the element nesting depth, so that we can
01817     //      know when we are inside content. This is so we can ignore char
01818     //      data outside of content.
01819     //
01820     //  fEntityResolver
01821     //      The installed SAX entity handler, if any. Null if none.
01822     //
01823     //  fErrorHandler
01824     //      The installed SAX error handler, if any. Null if none.
01825     //
01826     //  fAdvDHCount
01827     //  fAdvDHList
01828     //  fAdvDHListSize
01829     //      This is an array of pointers to XMLDocumentHandlers, which is
01830     //      how we see installed advanced document handlers. There will
01831     //      usually not be very many at all, so a simple array is used
01832     //      instead of a collection, for performance. It will grow if needed,
01833     //      but that is unlikely.
01834     //
01835     //      The count is how many handlers are currently installed. The size
01836     //      is how big the array itself is (for expansion purposes.) When
01837     //      count == size, is time to expand.
01838     //
01839     //  fParseInProgress
01840     //      This flag is set once a parse starts. It is used to prevent
01841     //      multiple entrance or reentrance of the parser.
01842     //
01843     //  fScanner
01844     //      The scanner being used by this parser. It is created internally
01845     //      during construction.
01846     //
01847     // -----------------------------------------------------------------------
01848     VecAttrListImpl         fAttrList;
01849     DocumentHandler*        fDocHandler;
01850     DTDHandler*             fDTDHandler;
01851     unsigned int            fElemDepth;
01852     EntityResolver*         fEntityResolver;
01853     ErrorHandler*           fErrorHandler;
01854     unsigned int            fAdvDHCount;
01855     XMLDocumentHandler**    fAdvDHList;
01856     unsigned int            fAdvDHListSize;
01857     bool                    fParseInProgress;
01858     XMLScanner*             fScanner;
01859 };
01860 
01861 
01862 // ---------------------------------------------------------------------------
01863 //  SAXParser: Getter methods
01864 // ---------------------------------------------------------------------------
01865 inline DocumentHandler* SAXParser::getDocumentHandler()
01866 {
01867     return fDocHandler;
01868 }
01869 
01870 inline const DocumentHandler* SAXParser::getDocumentHandler() const
01871 {
01872     return fDocHandler;
01873 }
01874 
01875 inline EntityResolver* SAXParser::getEntityResolver()
01876 {
01877     return fEntityResolver;
01878 }
01879 
01880 inline const EntityResolver* SAXParser::getEntityResolver() const
01881 {
01882     return fEntityResolver;
01883 }
01884 
01885 inline ErrorHandler* SAXParser::getErrorHandler()
01886 {
01887     return fErrorHandler;
01888 }
01889 
01890 inline const ErrorHandler* SAXParser::getErrorHandler() const
01891 {
01892     return fErrorHandler;
01893 }
01894 
01895 inline const XMLScanner& SAXParser::getScanner() const
01896 {
01897     return *fScanner;
01898 }
01899 
01900 #endif


Copyright © 2000 The Apache Software Foundation. All Rights Reserved.