| API Docs for SAX and DOM |
| Main Page Classes Files Related Pages # DOMDocument.hpp Go to the documentation of this file.
    00001 #ifndef DOMDocument_HEADER_GUARD_
    00002 #define DOMDocument_HEADER_GUARD_
    00003
    00004 /*
    00005  * Licensed to the Apache Software Foundation (ASF) under one or more
    00006  * contributor license agreements.  See the NOTICE file distributed with
    00007  * this work for additional information regarding copyright ownership.
    00008  * The ASF licenses this file to You under the Apache License, Version 2.0
    00009  * (the "License"); you may not use this file except in compliance with
    00010  * the License.  You may obtain a copy of the License at
    00011  *
    00012  *      http://www.apache.org/licenses/LICENSE-2.0
    00013  *
    00014  * Unless required by applicable law or agreed to in writing, software
    00015  * distributed under the License is distributed on an "AS IS" BASIS,
    00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00017  * See the License for the specific language governing permissions and
    00018  * limitations under the License.
    00019  */
    00020
    00021 /*
    00022  * $Id: DOMDocument.hpp 568078 2007-08-21 11:43:25Z amassari $
    00023 */
    00024
    00025 #include <xercesc/util/XercesDefs.hpp>
    00026 #include <xercesc/dom/DOMNode.hpp>
    00027 #include <xercesc/dom/DOMDocumentRange.hpp>
    00028 #include <xercesc/dom/DOMDocumentTraversal.hpp>
    00029 #include <xercesc/dom/DOMXPathEvaluator.hpp>
    00030
    00031 XERCES_CPP_NAMESPACE_BEGIN
    00032
    00033 class DOMConfiguration;
    00034 class DOMDocumentType;
    00035 class DOMElement;
    00036 class DOMDocumentFragment;
    00037 class DOMComment;
    00038 class DOMCDATASection;
    00039 class DOMProcessingInstruction;
    00040 class DOMAttr;
    00041 class DOMEntity;
    00042 class DOMEntityReference;
    00043 class DOMImplementation;
    00044 class DOMNodeFilter;
    00045 class DOMNodeList;
    00046 class DOMNotation;
    00047 class DOMText;
    00048 class DOMNode;
    00049
    00050
    00064 class  DOMDocument: public DOMDocumentRange,
    00065  public DOMXPathEvaluator,
    00066  public DOMDocumentTraversal,
    00067  public DOMNode {
    00068
    00069
    00070 protected:
    00071     // -----------------------------------------------------------------------
    00072     //  Hidden constructors
    00073     // -----------------------------------------------------------------------
    00076     DOMDocument() {};
    00078
    00079 private:
    00080     // -----------------------------------------------------------------------
    00081     // Unimplemented constructors and operators
    00082     // -----------------------------------------------------------------------
    00085     DOMDocument(const DOMDocument &);
    00086     DOMDocument & operator = (const DOMDocument &);
    00088
    00089 public:
    00090     // -----------------------------------------------------------------------
    00091     //  All constructors are hidden, just the destructor is available
    00092     // -----------------------------------------------------------------------
    00099     virtual ~DOMDocument() {};
    00101
    00102     // -----------------------------------------------------------------------
    00103     // Virtual DOMDocument interface
    00104     // -----------------------------------------------------------------------
    00127     virtual DOMElement     *createElement(const XMLCh *tagName) = 0;
    00128
    00134     virtual DOMDocumentFragment   *createDocumentFragment() = 0;
    00135
    00142     virtual DOMText         *createTextNode(const XMLCh *data) = 0;
    00143
    00150     virtual DOMComment      *createComment(const XMLCh *data) = 0;
    00151
    00159     virtual DOMCDATASection   *createCDATASection(const XMLCh *data) = 0;
    00160
    00172     virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
    00173         const XMLCh *data) = 0;
    00174
    00175
    00192     virtual DOMAttr     *createAttribute(const XMLCh *name) = 0;
    00193
    00194
    00212     virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;
    00213
    00225     virtual DOMDocumentType       *getDoctype() const = 0;
    00226
    00232     virtual DOMImplementation  *getImplementation() const = 0;
    00233
    00239     virtual DOMElement     *getDocumentElement() const = 0;
    00240
    00255     virtual DOMNodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;
    00256
    00258
    00261
    00360     virtual DOMNode        *importNode(DOMNode *importedNode, bool deep) = 0;
    00361
    00417     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    00418                                                   const XMLCh *qualifiedName) = 0;
    00419
    00482     virtual DOMAttr        *createAttributeNS(const XMLCh *namespaceURI,
    00483                                                 const XMLCh *qualifiedName) = 0;
    00484
    00497     virtual DOMNodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
    00498                                                          const XMLCh *localName) const = 0;
    00499
    00513     virtual  DOMElement        * getElementById(const XMLCh *elementId) const = 0;
    00515
    00518
    00529     virtual const XMLCh*           getActualEncoding() const = 0;
    00530
    00541     virtual void                   setActualEncoding(const XMLCh* actualEncoding) = 0;
    00542
    00551     virtual const XMLCh*           getEncoding() const = 0;
    00552
    00561     virtual void                   setEncoding(const XMLCh* encoding) = 0;
    00562
    00572     virtual bool                   getStandalone() const = 0;
    00573
    00583     virtual void                   setStandalone(bool standalone) = 0;
    00584
    00594     virtual const XMLCh*           getVersion() const = 0;
    00595
    00605     virtual void                   setVersion(const XMLCh* version) = 0;
    00606
    00617     virtual const XMLCh*           getDocumentURI() const = 0;
    00628     virtual void                   setDocumentURI(const XMLCh* documentURI) = 0;
    00629
    00642     virtual bool                   getStrictErrorChecking() const = 0;
    00655     virtual void                   setStrictErrorChecking(bool strictErrorChecking) = 0;
    00656
    00703     virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) = 0;
    00704
    00705
    00767     virtual DOMNode*               adoptNode(DOMNode* source) = 0;
    00768
    00793     virtual void                   normalizeDocument() = 0;
    00794
    00795
    00811     virtual DOMConfiguration*      getDOMConfiguration() const = 0;
    00812
    00814
    00815     // -----------------------------------------------------------------------
    00816     // Non-standard extension
    00817     // -----------------------------------------------------------------------
    00827     virtual DOMEntity     *createEntity(const XMLCh *name) = 0;
    00828
    00837     virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
    00838
    00839     /***
    00840      * Provide default implementation to maintain source code compatibility
    00841      ***/
    00842     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
    00843                                                 const XMLCh*,  //publicId,
    00844                                                 const XMLCh*   //systemId
    00845                                                )
    00846     {
    00847         return createDocumentType(qName);
    00848     }
    00849
    00858     virtual DOMNotation *createNotation(const XMLCh *name) = 0;
    00859
    00869     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    00870                                                   const XMLCh *qualifiedName,
    00871                                                   const XMLSSize_t lineNum,
    00872                                                   const XMLSSize_t columnNum) = 0;
    00874
    00875 };
    00876
    00877 XERCES_CPP_NAMESPACE_END
    00878
    00879 #endif

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