Xerces-C++: DOMElement.hpp Source File

- Main Page
- Classes
- Files
- Related Pages

# DOMElement.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: DOMElement.hpp 527149 2007-04-10 14:56:39Z amassari $
    00020  */
    00021
    00022 #if !defined(XERCESC_INCLUDE_GUARD_DOMELEMENT_HPP)
    00023 #define XERCESC_INCLUDE_GUARD_DOMELEMENT_HPP
    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 CDOM_EXPORT 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
    00411     virtual void setIdAttribute(const XMLCh* name, bool isId) = 0;
    00412
    00413
    00432     virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId) = 0;
    00433
    00434
    00435
    00453     virtual void setIdAttributeNode(const DOMAttr *idAttr, bool isId) = 0;
    00454
    00455
    00456
    00463     virtual const DOMTypeInfo* getSchemaTypeInfo() const = 0;
    00464
    00466
    00467 };
    00468
    00469 XERCES_CPP_NAMESPACE_END
    00470
    00471 #endif
    00472
    00473
    00474