| API Docs for SAX and DOM |
| Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members # DOMDocument.hpp Go to the documentation of this file.
    00001 #ifndef DOMDocument_HEADER_GUARD_
    00002 #define DOMDocument_HEADER_GUARD_
    00003
    00004 /*
    00005  * The Apache Software License, Version 1.1
    00006  *
    00007  * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    00008  * reserved.
    00009  *
    00010  * Redistribution and use in source and binary forms, with or without
    00011  * modification, are permitted provided that the following conditions
    00012  * are met:
    00013  *
    00014  * 1. Redistributions of source code must retain the above copyright
    00015  *    notice, this list of conditions and the following disclaimer.
    00016  *
    00017  * 2. Redistributions in binary form must reproduce the above copyright
    00018  *    notice, this list of conditions and the following disclaimer in
    00019  *    the documentation and/or other materials provided with the
    00020  *    distribution.
    00021  *
    00022  * 3. The end-user documentation included with the redistribution,
    00023  *    if any, must include the following acknowledgment:
    00024  *       "This product includes software developed by the
    00025  *        Apache Software Foundation (http://www.apache.org/)."
    00026  *    Alternately, this acknowledgment may appear in the software itself,
    00027  *    if and wherever such third-party acknowledgments normally appear.
    00028  *
    00029  * 4. The names "Xerces" and "Apache Software Foundation" must
    00030  *    not be used to endorse or promote products derived from this
    00031  *    software without prior written permission. For written
    00032  *    permission, please contact apache\@apache.org.
    00033  *
    00034  * 5. Products derived from this software may not be called "Apache",
    00035  *    nor may "Apache" appear in their name, without prior written
    00036  *    permission of the Apache Software Foundation.
    00037  *
    00038  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    00039  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    00040  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    00041  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
    00042  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00043  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    00044  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    00045  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00046  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    00047  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    00048  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    00049  * SUCH DAMAGE.
    00050  * ====================================================================
    00051  *
    00052  * This software consists of voluntary contributions made by many
    00053  * individuals on behalf of the Apache Software Foundation, and was
    00054  * originally based on software copyright (c) 2001, International
    00055  * Business Machines, Inc., http://www.ibm.com .  For more information
    00056  * on the Apache Software Foundation, please see
    00057  * <http://www.apache.org/>.
    00058  */
    00059
    00060 /*
    00061  * $Id: DOMDocument.hpp,v 1.10 2002/11/04 15:09:24 tng Exp $
    00062 */
    00063
    00064 #include <xercesc/util/XercesDefs.hpp>
    00065 #include "DOMNode.hpp"
    00066 #include "DOMDocumentRange.hpp"
    00067 #include "DOMDocumentTraversal.hpp"
    00068
    00069 XERCES_CPP_NAMESPACE_BEGIN
    00070
    00071 class DOMDocumentType;
    00072 class DOMElement;
    00073 class DOMDocumentFragment;
    00074 class DOMComment;
    00075 class DOMCDATASection;
    00076 class DOMProcessingInstruction;
    00077 class DOMAttr;
    00078 class DOMEntity;
    00079 class DOMEntityReference;
    00080 class DOMImplementation;
    00081 class DOMNodeFilter;
    00082 class DOMNodeList;
    00083 class DOMNotation;
    00084 class DOMText;
    00085 class DOMNode;
    00086 class DOMErrorHandler;
    00087
    00088
    00102 class  DOMDocument: public DOMDocumentRange,
    00103  public DOMDocumentTraversal,
    00104  public DOMNode {
    00105
    00106 protected:
    00107     // -----------------------------------------------------------------------
    00108     //  Hidden constructors
    00109     // -----------------------------------------------------------------------
    00112     DOMDocument() {};
    00113     DOMDocument(const DOMDocument &) {};
    00114     DOMDocument & operator = (const DOMDocument &) {return *this;};
    00116
    00117 public:
    00118     // -----------------------------------------------------------------------
    00119     //  All constructors are hidden, just the destructor is available
    00120     // -----------------------------------------------------------------------
    00127     virtual ~DOMDocument() {};
    00129
    00130     // -----------------------------------------------------------------------
    00131     // Virtual DOMDocument interface
    00132     // -----------------------------------------------------------------------
    00155     virtual DOMElement     *createElement(const XMLCh *tagName) = 0;
    00156
    00162     virtual DOMDocumentFragment   *createDocumentFragment() = 0;
    00163
    00170     virtual DOMText         *createTextNode(const XMLCh *data) = 0;
    00171
    00178     virtual DOMComment      *createComment(const XMLCh *data) = 0;
    00179
    00187     virtual DOMCDATASection   *createCDATASection(const XMLCh *data) = 0;
    00188
    00200     virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
    00201         const XMLCh *data) = 0;
    00202
    00203
    00220     virtual DOMAttr     *createAttribute(const XMLCh *name) = 0;
    00221
    00222
    00240     virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;
    00241
    00253     virtual DOMDocumentType       *getDoctype() const = 0;
    00254
    00260     virtual DOMImplementation  *getImplementation() const = 0;
    00261
    00267     virtual DOMElement     *getDocumentElement() const = 0;
    00268
    00283     virtual DOMNodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;
    00284
    00286
    00289
    00388     virtual DOMNode        *importNode(DOMNode *importedNode, bool deep) = 0;
    00389
    00445     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    00446                                                   const XMLCh *qualifiedName) = 0;
    00447
    00510     virtual DOMAttr        *createAttributeNS(const XMLCh *namespaceURI,
    00511                                                 const XMLCh *qualifiedName) = 0;
    00512
    00525     virtual DOMNodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
    00526                                                          const XMLCh *localName) const = 0;
    00527
    00541     virtual  DOMElement        * getElementById(const XMLCh *elementId) const = 0;
    00543
    00546
    00557     virtual const XMLCh*           getActualEncoding() const = 0;
    00558
    00569     virtual void                   setActualEncoding(const XMLCh* actualEncoding) = 0;
    00570
    00579     virtual const XMLCh*           getEncoding() const = 0;
    00580
    00589     virtual void                   setEncoding(const XMLCh* encoding) = 0;
    00590
    00600     virtual bool                   getStandalone() const = 0;
    00601
    00611     virtual void                   setStandalone(bool standalone) = 0;
    00612
    00622     virtual const XMLCh*           getVersion() const = 0;
    00623
    00633     virtual void                   setVersion(const XMLCh* version) = 0;
    00634
    00645     virtual const XMLCh*           getDocumentURI() const = 0;
    00656     virtual void                   setDocumentURI(const XMLCh* documentURI) = 0;
    00657
    00670     virtual bool                   getStrictErrorChecking() const = 0;
    00683     virtual void                   setStrictErrorChecking(bool strictErrorChecking) = 0;
    00684
    00696     virtual DOMErrorHandler*       getErrorHandler() const = 0;
    00708     virtual void                   setErrorHandler(DOMErrorHandler* const handler) = 0;
    00709
    00756     virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) = 0;
    00757
    00758
    00820     virtual DOMNode*               adoptNode(DOMNode* source) = 0;
    00821
    00841     virtual void                   normalizeDocument() = 0;
    00842
    00859     virtual bool                   canSetNormalizationFeature(const XMLCh* const name, bool state) const = 0;
    00860
    01096     virtual void                   setNormalizationFeature(const XMLCh* const name, bool state) = 0;
    01097
    01113     virtual bool                   getNormalizationFeature(const XMLCh* const name) const = 0;
    01115
    01116     // -----------------------------------------------------------------------
    01117     // Non-standard extension
    01118     // -----------------------------------------------------------------------
    01128     virtual DOMEntity     *createEntity(const XMLCh *name) = 0;
    01129
    01138     virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
    01139
    01140
    01149     virtual DOMNotation *createNotation(const XMLCh *name) = 0;
    01150
    01160     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    01161                                                   const XMLCh *qualifiedName,
    01162                                                   const XMLSSize_t lineNum,
    01163                                                   const XMLSSize_t columnNum) = 0;
    01165
    01166 protected:
    01167     friend class DOMNode;
    01168     friend class DOMImplementation;
    01169
    01170 };
    01171
    01172 XERCES_CPP_NAMESPACE_END
    01173
    01174 #endif

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