DOMDocument.hpp Source File

| 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.14 2003/05/14 19:23:20 gareth 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 DOMConfiguration;
    00072 class DOMDocumentType;
    00073 class DOMElement;
    00074 class DOMDocumentFragment;
    00075 class DOMComment;
    00076 class DOMCDATASection;
    00077 class DOMProcessingInstruction;
    00078 class DOMAttr;
    00079 class DOMEntity;
    00080 class DOMEntityReference;
    00081 class DOMImplementation;
    00082 class DOMNodeFilter;
    00083 class DOMNodeList;
    00084 class DOMNotation;
    00085 class DOMText;
    00086 class DOMNode;
    00087
    00088
    00102 class  DOMDocument: public DOMDocumentRange,
    00103  public DOMDocumentTraversal,
    00104  public DOMNode {
    00105
    00106 protected:
    00107     // -----------------------------------------------------------------------
    00108     //  Hidden constructors
    00109     // -----------------------------------------------------------------------
    00112     DOMDocument() {};
    00114
    00115 private:
    00116     // -----------------------------------------------------------------------
    00117     // Unimplemented constructors and operators
    00118     // -----------------------------------------------------------------------
    00121     DOMDocument(const DOMDocument &);
    00122     DOMDocument & operator = (const DOMDocument &);
    00124
    00125 public:
    00126     // -----------------------------------------------------------------------
    00127     //  All constructors are hidden, just the destructor is available
    00128     // -----------------------------------------------------------------------
    00135     virtual ~DOMDocument() {};
    00137
    00138     // -----------------------------------------------------------------------
    00139     // Virtual DOMDocument interface
    00140     // -----------------------------------------------------------------------
    00163     virtual DOMElement     *createElement(const XMLCh *tagName) = 0;
    00164
    00170     virtual DOMDocumentFragment   *createDocumentFragment() = 0;
    00171
    00178     virtual DOMText         *createTextNode(const XMLCh *data) = 0;
    00179
    00186     virtual DOMComment      *createComment(const XMLCh *data) = 0;
    00187
    00195     virtual DOMCDATASection   *createCDATASection(const XMLCh *data) = 0;
    00196
    00208     virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
    00209         const XMLCh *data) = 0;
    00210
    00211
    00228     virtual DOMAttr     *createAttribute(const XMLCh *name) = 0;
    00229
    00230
    00248     virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;
    00249
    00261     virtual DOMDocumentType       *getDoctype() const = 0;
    00262
    00268     virtual DOMImplementation  *getImplementation() const = 0;
    00269
    00275     virtual DOMElement     *getDocumentElement() const = 0;
    00276
    00291     virtual DOMNodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;
    00292
    00294
    00297
    00396     virtual DOMNode        *importNode(DOMNode *importedNode, bool deep) = 0;
    00397
    00453     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    00454                                                   const XMLCh *qualifiedName) = 0;
    00455
    00518     virtual DOMAttr        *createAttributeNS(const XMLCh *namespaceURI,
    00519                                                 const XMLCh *qualifiedName) = 0;
    00520
    00533     virtual DOMNodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
    00534                                                          const XMLCh *localName) const = 0;
    00535
    00549     virtual  DOMElement        * getElementById(const XMLCh *elementId) const = 0;
    00551
    00554
    00565     virtual const XMLCh*           getActualEncoding() const = 0;
    00566
    00577     virtual void                   setActualEncoding(const XMLCh* actualEncoding) = 0;
    00578
    00587     virtual const XMLCh*           getEncoding() const = 0;
    00588
    00597     virtual void                   setEncoding(const XMLCh* encoding) = 0;
    00598
    00608     virtual bool                   getStandalone() const = 0;
    00609
    00619     virtual void                   setStandalone(bool standalone) = 0;
    00620
    00630     virtual const XMLCh*           getVersion() const = 0;
    00631
    00641     virtual void                   setVersion(const XMLCh* version) = 0;
    00642
    00653     virtual const XMLCh*           getDocumentURI() const = 0;
    00664     virtual void                   setDocumentURI(const XMLCh* documentURI) = 0;
    00665
    00678     virtual bool                   getStrictErrorChecking() const = 0;
    00691     virtual void                   setStrictErrorChecking(bool strictErrorChecking) = 0;
    00692
    00739     virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) = 0;
    00740
    00741
    00803     virtual DOMNode*               adoptNode(DOMNode* source) = 0;
    00804
    00829     virtual void                   normalizeDocument() = 0;
    00830
    00831
    00847     virtual DOMConfiguration*      getDOMConfiguration() const = 0;
    00848
    00849     // -----------------------------------------------------------------------
    00850     // Non-standard extension
    00851     // -----------------------------------------------------------------------
    00861     virtual DOMEntity     *createEntity(const XMLCh *name) = 0;
    00862
    00871     virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
    00872
    00873
    00882     virtual DOMNotation *createNotation(const XMLCh *name) = 0;
    00883
    00893     virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
    00894                                                   const XMLCh *qualifiedName,
    00895                                                   const XMLSSize_t lineNum,
    00896                                                   const XMLSSize_t columnNum) = 0;
    00898
    00899 };
    00900
    00901 XERCES_CPP_NAMESPACE_END
    00902
    00903 #endif

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