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  

DOMDocument.hpp

Go to the documentation of this file.
00001 #ifndef DOMDocument_HEADER_GUARD_
00002 #define DOMDocument_HEADER_GUARD_
00003 
00004 /*
00005  * Copyright 2001-2002,2004 The Apache Software Foundation.
00006  * 
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  * 
00011  *      http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 
00020 /*
00021  * $Id: DOMDocument.hpp,v 1.19 2004/09/26 15:38:02 gareth Exp $
00022 */
00023 
00024 #include <xercesc/util/XercesDefs.hpp>
00025 #include <xercesc/dom/DOMNode.hpp>
00026 #include <xercesc/dom/DOMDocumentRange.hpp>
00027 #include <xercesc/dom/DOMDocumentTraversal.hpp>
00028 #include <xercesc/dom/DOMXPathEvaluator.hpp>
00029 
00030 XERCES_CPP_NAMESPACE_BEGIN
00031 
00032 class DOMConfiguration;
00033 class DOMDocumentType;
00034 class DOMElement;
00035 class DOMDocumentFragment;
00036 class DOMComment;
00037 class DOMCDATASection;
00038 class DOMProcessingInstruction;
00039 class DOMAttr;
00040 class DOMEntity;
00041 class DOMEntityReference;
00042 class DOMImplementation;
00043 class DOMNodeFilter;
00044 class DOMNodeList;
00045 class DOMNotation;
00046 class DOMText;
00047 class DOMNode;
00048 
00049 
00063 class  DOMDocument: public DOMDocumentRange,
00064  public DOMXPathEvaluator,
00065  public DOMDocumentTraversal,
00066  public DOMNode {
00067 
00068 
00069 protected:
00070     // -----------------------------------------------------------------------
00071     //  Hidden constructors
00072     // -----------------------------------------------------------------------
00075     DOMDocument() {};
00077 
00078 private:
00079     // -----------------------------------------------------------------------
00080     // Unimplemented constructors and operators
00081     // -----------------------------------------------------------------------
00084     DOMDocument(const DOMDocument &);
00085     DOMDocument & operator = (const DOMDocument &);
00087 
00088 public:
00089     // -----------------------------------------------------------------------
00090     //  All constructors are hidden, just the destructor is available
00091     // -----------------------------------------------------------------------
00098     virtual ~DOMDocument() {};
00100 
00101     // -----------------------------------------------------------------------
00102     // Virtual DOMDocument interface
00103     // -----------------------------------------------------------------------
00126     virtual DOMElement     *createElement(const XMLCh *tagName) = 0;
00127 
00133     virtual DOMDocumentFragment   *createDocumentFragment() = 0;
00134 
00141     virtual DOMText         *createTextNode(const XMLCh *data) = 0;
00142 
00149     virtual DOMComment      *createComment(const XMLCh *data) = 0;
00150 
00158     virtual DOMCDATASection   *createCDATASection(const XMLCh *data) = 0;
00159 
00171     virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
00172         const XMLCh *data) = 0;
00173 
00174 
00191     virtual DOMAttr     *createAttribute(const XMLCh *name) = 0;
00192 
00193 
00211     virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;
00212 
00224     virtual DOMDocumentType       *getDoctype() const = 0;
00225 
00231     virtual DOMImplementation  *getImplementation() const = 0;
00232 
00238     virtual DOMElement     *getDocumentElement() const = 0;
00239 
00254     virtual DOMNodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;
00255 
00257 
00260 
00359     virtual DOMNode        *importNode(DOMNode *importedNode, bool deep) = 0;
00360 
00416     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
00417                                                   const XMLCh *qualifiedName) = 0;
00418 
00481     virtual DOMAttr        *createAttributeNS(const XMLCh *namespaceURI,
00482                                                 const XMLCh *qualifiedName) = 0;
00483 
00496     virtual DOMNodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
00497                                                          const XMLCh *localName) const = 0;
00498 
00512     virtual  DOMElement        * getElementById(const XMLCh *elementId) const = 0;
00514 
00517 
00528     virtual const XMLCh*           getActualEncoding() const = 0;
00529 
00540     virtual void                   setActualEncoding(const XMLCh* actualEncoding) = 0;
00541 
00550     virtual const XMLCh*           getEncoding() const = 0;
00551 
00560     virtual void                   setEncoding(const XMLCh* encoding) = 0;
00561 
00571     virtual bool                   getStandalone() const = 0;
00572 
00582     virtual void                   setStandalone(bool standalone) = 0;
00583 
00593     virtual const XMLCh*           getVersion() const = 0;
00594 
00604     virtual void                   setVersion(const XMLCh* version) = 0;
00605 
00616     virtual const XMLCh*           getDocumentURI() const = 0;
00627     virtual void                   setDocumentURI(const XMLCh* documentURI) = 0;
00628 
00641     virtual bool                   getStrictErrorChecking() const = 0;
00654     virtual void                   setStrictErrorChecking(bool strictErrorChecking) = 0;
00655 
00702     virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) = 0;
00703 
00704 
00766     virtual DOMNode*               adoptNode(DOMNode* source) = 0;
00767 
00792     virtual void                   normalizeDocument() = 0;
00793 
00794 
00810     virtual DOMConfiguration*      getDOMConfiguration() const = 0;
00811 
00812     // -----------------------------------------------------------------------
00813     // Non-standard extension
00814     // -----------------------------------------------------------------------
00824     virtual DOMEntity     *createEntity(const XMLCh *name) = 0;
00825 
00834     virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
00835 
00836     /***
00837      * Provide default implementation to maintain source code compatibility
00838      ***/
00839     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
00840                                                 const XMLCh *publicId,
00841                                                 const XMLCh *systemId)
00842     {
00843         return createDocumentType(qName);
00844     }
00845 
00854     virtual DOMNotation *createNotation(const XMLCh *name) = 0;
00855 
00865     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
00866                                                   const XMLCh *qualifiedName,
00867                                                   const XMLSSize_t lineNum,
00868                                                   const XMLSSize_t columnNum) = 0;
00870 
00871 };
00872 
00873 XERCES_CPP_NAMESPACE_END
00874 
00875 #endif


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