| API Docs for SAX and DOM |

- Main Page
- Classes
- Files
- Related Pages

# DOMElement.hpp

Go to the documentation of this file.

    00001 #ifndef DOMElement_HEADER_GUARD_
    00002 #define DOMElement_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: DOMElement.hpp 568078 2007-08-21 11:43:25Z amassari $
    00023  */
    00024
    00025 #include <xercesc/util/XercesDefs.hpp>
    00026 #include <xercesc/dom/DOMNode.hpp>
    00027
    00028 XERCES_CPP_NAMESPACE_BEGIN
    00029
    00030
    00031 class DOMAttr;
    00032 class DOMNodeList;
    00033 class DOMTypeInfo;
    00034
    00035
    00063 class  DOMElement: public DOMNode {
    00064 protected:
    00065     // -----------------------------------------------------------------------
    00066     //  Hidden constructors
    00067     // -----------------------------------------------------------------------
    00070     DOMElement() {}
    00071     DOMElement(const DOMElement &other) : DOMNode(other) {}
    00073
    00074 private:
    00075     // -----------------------------------------------------------------------
    00076     // Unimplemented constructors and operators
    00077     // -----------------------------------------------------------------------
    00080     DOMElement & operator = (const DOMElement &);
    00082
    00083 public:
    00084     // -----------------------------------------------------------------------
    00085     //  All constructors are hidden, just the destructor is available
    00086     // -----------------------------------------------------------------------
    00093     virtual ~DOMElement() {};
    00095
    00096     // -----------------------------------------------------------------------
    00097     //  Virtual DOMElement interface
    00098     // -----------------------------------------------------------------------
    00101     // -----------------------------------------------------------------------
    00102     //  Getter methods
    00103     // -----------------------------------------------------------------------
    00113     virtual const XMLCh *         getTagName() const = 0;
    00114
    00123     virtual const XMLCh *         getAttribute(const XMLCh *name) const = 0;
    00124
    00133     virtual DOMAttr       * getAttributeNode(const XMLCh *name) const = 0;
    00134
    00145     virtual DOMNodeList   * getElementsByTagName(const XMLCh *name) const = 0;
    00146
    00147     // -----------------------------------------------------------------------
    00148     //  Setter methods
    00149     // -----------------------------------------------------------------------
    00172     virtual void             setAttribute(const XMLCh *name,
    00173                                   const XMLCh *value) = 0;
    00194     virtual DOMAttr       * setAttributeNode(DOMAttr *newAttr) = 0;
    00195
    00212     virtual DOMAttr       * removeAttributeNode(DOMAttr *oldAttr) = 0;
    00213
    00227     virtual void              removeAttribute(const XMLCh *name) = 0;
    00229
    00243     virtual const XMLCh *         getAttributeNS(const XMLCh *namespaceURI,
    00244                                                  const XMLCh *localName) const = 0;
    00245
    00285     virtual void             setAttributeNS(const XMLCh *namespaceURI,
    00286                                             const XMLCh *qualifiedName, const XMLCh *value) = 0;
    00287
    00302     virtual void              removeAttributeNS(const XMLCh *namespaceURI,
    00303                                                 const XMLCh *localName) = 0;
    00304
    00316     virtual DOMAttr      *  getAttributeNodeNS(const XMLCh *namespaceURI,
    00317                                                const XMLCh *localName) const = 0;
    00318
    00340     virtual DOMAttr      *  setAttributeNodeNS(DOMAttr *newAttr) = 0;
    00341
    00357     virtual DOMNodeList   * getElementsByTagNameNS(const XMLCh *namespaceURI,
    00358                                                    const XMLCh *localName) const = 0;
    00359
    00370     virtual bool         hasAttribute(const XMLCh *name) const = 0;
    00371
    00384     virtual bool         hasAttributeNS(const XMLCh *namespaceURI,
    00385                                         const XMLCh *localName) const = 0;
    00387
    00390
    00409     virtual void setIdAttribute(const XMLCh* name) = 0;
    00410
    00411
    00429     virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName) = 0;
    00430
    00431
    00432
    00448     virtual void setIdAttributeNode(const DOMAttr *idAttr) = 0;
    00449
    00450
    00451
    00460     virtual const DOMTypeInfo* getTypeInfo() const = 0;
    00461
    00463
    00464 };
    00465
    00466 XERCES_CPP_NAMESPACE_END
    00467
    00468 #endif
    00469
    00470
    00471

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