| 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.9 2002/08/22 15:04:57 tng Exp $
    00062 */
    00063
    00064 #include <xercesc/util/XercesDefs.hpp>
    00065 #include "DOMNode.hpp"
    00066 #include "DOMDocumentRange.hpp"
    00067 #include "DOMDocumentTraversal.hpp"
    00068
    00069
    00070 class DOMDocumentType;
    00071 class DOMElement;
    00072 class DOMDocumentFragment;
    00073 class DOMComment;
    00074 class DOMCDATASection;
    00075 class DOMProcessingInstruction;
    00076 class DOMAttr;
    00077 class DOMEntity;
    00078 class DOMEntityReference;
    00079 class DOMImplementation;
    00080 class DOMNodeFilter;
    00081 class DOMNodeList;
    00082 class DOMNotation;
    00083 class DOMText;
    00084 class DOMNode;
    00085 class DOMErrorHandler;
    00086
    00087
    00100
    00101 class  DOMDocument: public DOMDocumentRange,
    00102  public DOMDocumentTraversal,
    00103  public DOMNode {
    00104
    00105 protected:
    00106     // -----------------------------------------------------------------------
    00107     //  Hidden constructors
    00108     // -----------------------------------------------------------------------
    00111     DOMDocument() {};
    00112     DOMDocument(const DOMDocument &) {};
    00113     DOMDocument & operator = (const DOMDocument &) {return *this;};
    00115
    00116 public:
    00117     // -----------------------------------------------------------------------
    00118     //  All constructors are hidden, just the destructor is available
    00119     // -----------------------------------------------------------------------
    00122
    00126     virtual ~DOMDocument() {};
    00128
    00129     // -----------------------------------------------------------------------
    00130     // Virtual DOMDocument interface
    00131     // -----------------------------------------------------------------------
    00134
    00154     virtual DOMElement     *createElement(const XMLCh *tagName) = 0;
    00155
    00161     virtual DOMDocumentFragment   *createDocumentFragment() = 0;
    00162
    00169     virtual DOMText         *createTextNode(const XMLCh *data) = 0;
    00170
    00177     virtual DOMComment      *createComment(const XMLCh *data) = 0;
    00178
    00186     virtual DOMCDATASection   *createCDATASection(const XMLCh *data) = 0;
    00187
    00199     virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
    00200         const XMLCh *data) = 0;
    00201
    00202
    00219     virtual DOMAttr     *createAttribute(const XMLCh *name) = 0;
    00220
    00221
    00239     virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;
    00240
    00252     virtual DOMDocumentType       *getDoctype() const = 0;
    00253
    00259     virtual DOMImplementation  *getImplementation() const = 0;
    00260
    00266     virtual DOMElement     *getDocumentElement() const = 0;
    00267
    00282     virtual DOMNodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;
    00283
    00285
    00288
    00387     virtual DOMNode        *importNode(DOMNode *importedNode, bool deep) = 0;
    00388
    00444     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    00445                                                   const XMLCh *qualifiedName) = 0;
    00446
    00509     virtual DOMAttr        *createAttributeNS(const XMLCh *namespaceURI,
    00510                                                 const XMLCh *qualifiedName) = 0;
    00511
    00524     virtual DOMNodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
    00525                                                          const XMLCh *localName) const = 0;
    00526
    00540     virtual  DOMElement        * getElementById(const XMLCh *elementId) const = 0;
    00542
    00545
    00556     virtual const XMLCh*           getActualEncoding() const = 0;
    00557
    00568     virtual void                   setActualEncoding(const XMLCh* actualEncoding) = 0;
    00569
    00578     virtual const XMLCh*           getEncoding() const = 0;
    00579
    00588     virtual void                   setEncoding(const XMLCh* encoding) = 0;
    00589
    00599     virtual bool                   getStandalone() const = 0;
    00600
    00610     virtual void                   setStandalone(bool standalone) = 0;
    00611
    00621     virtual const XMLCh*           getVersion() const = 0;
    00622
    00632     virtual void                   setVersion(const XMLCh* version) = 0;
    00633
    00644     virtual const XMLCh*           getDocumentURI() const = 0;
    00655     virtual void                   setDocumentURI(const XMLCh* documentURI) = 0;
    00656
    00669     virtual bool                   getStrictErrorChecking() const = 0;
    00682     virtual void                   setStrictErrorChecking(bool strictErrorChecking) = 0;
    00683
    00695     virtual DOMErrorHandler*       getErrorHandler() const = 0;
    00707     virtual void                   setErrorHandler(DOMErrorHandler* const handler) = 0;
    00708
    00755     virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) = 0;
    00756
    00757
    00819     virtual DOMNode*               adoptNode(DOMNode* source) = 0;
    00820
    00840     virtual void                   normalizeDocument() = 0;
    00841
    00858     virtual bool                   canSetNormalizationFeature(const XMLCh* const name, bool state) const = 0;
    00859
    01095     virtual void                   setNormalizationFeature(const XMLCh* const name, bool state) = 0;
    01096
    01112     virtual bool                   getNormalizationFeature(const XMLCh* const name) const = 0;
    01114
    01115     // -----------------------------------------------------------------------
    01116     // Non-standard extension
    01117     // -----------------------------------------------------------------------
    01120
    01127     virtual DOMEntity     *createEntity(const XMLCh *name) = 0;
    01128
    01137     virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
    01138
    01139
    01148     virtual DOMNotation *createNotation(const XMLCh *name) = 0;
    01149
    01159     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    01160                                                   const XMLCh *qualifiedName,
    01161                                                   const XMLSSize_t lineNum,
    01162                                                   const XMLSSize_t columnNum) = 0;
    01164
    01165 protected:
    01166     friend class DOMNode;
    01167     friend class DOMImplementation;
    01168
    01169 };
    01170
    01171 #endif

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