| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # DOMElement.hpp Go to the documentation of this file.
    00001 #ifndef DOMElement_HEADER_GUARD_
    00002 #define DOMElement_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: DOMElement.hpp 176280 2005-01-07 15:32:34Z amassari $
    00022  */
    00023
    00024 #include <xercesc/util/XercesDefs.hpp>
    00025 #include <xercesc/dom/DOMNode.hpp>
    00026
    00027 XERCES_CPP_NAMESPACE_BEGIN
    00028
    00029
    00030 class DOMAttr;
    00031 class DOMNodeList;
    00032 class DOMTypeInfo;
    00033
    00034
    00062 class  DOMElement: public DOMNode {
    00063 protected:
    00064     // -----------------------------------------------------------------------
    00065     //  Hidden constructors
    00066     // -----------------------------------------------------------------------
    00069     DOMElement() {}
    00070     DOMElement(const DOMElement &other) : DOMNode(other) {}
    00072
    00073 private:
    00074     // -----------------------------------------------------------------------
    00075     // Unimplemented constructors and operators
    00076     // -----------------------------------------------------------------------
    00079     DOMElement & operator = (const DOMElement &);
    00081
    00082 public:
    00083     // -----------------------------------------------------------------------
    00084     //  All constructors are hidden, just the destructor is available
    00085     // -----------------------------------------------------------------------
    00092     virtual ~DOMElement() {};
    00094
    00095     // -----------------------------------------------------------------------
    00096     //  Virtual DOMElement interface
    00097     // -----------------------------------------------------------------------
    00100     // -----------------------------------------------------------------------
    00101     //  Getter methods
    00102     // -----------------------------------------------------------------------
    00112     virtual const XMLCh *         getTagName() const = 0;
    00113
    00122     virtual const XMLCh *         getAttribute(const XMLCh *name) const = 0;
    00123
    00132     virtual DOMAttr       * getAttributeNode(const XMLCh *name) const = 0;
    00133
    00144     virtual DOMNodeList   * getElementsByTagName(const XMLCh *name) const = 0;
    00145
    00146     // -----------------------------------------------------------------------
    00147     //  Setter methods
    00148     // -----------------------------------------------------------------------
    00171     virtual void             setAttribute(const XMLCh *name,
    00172                                   const XMLCh *value) = 0;
    00193     virtual DOMAttr       * setAttributeNode(DOMAttr *newAttr) = 0;
    00194
    00211     virtual DOMAttr       * removeAttributeNode(DOMAttr *oldAttr) = 0;
    00212
    00226     virtual void              removeAttribute(const XMLCh *name) = 0;
    00228
    00242     virtual const XMLCh *         getAttributeNS(const XMLCh *namespaceURI,
    00243                                                  const XMLCh *localName) const = 0;
    00244
    00284     virtual void             setAttributeNS(const XMLCh *namespaceURI,
    00285                                             const XMLCh *qualifiedName, const XMLCh *value) = 0;
    00286
    00301     virtual void              removeAttributeNS(const XMLCh *namespaceURI,
    00302                                                 const XMLCh *localName) = 0;
    00303
    00315     virtual DOMAttr      *  getAttributeNodeNS(const XMLCh *namespaceURI,
    00316                                                const XMLCh *localName) const = 0;
    00317
    00339     virtual DOMAttr      *  setAttributeNodeNS(DOMAttr *newAttr) = 0;
    00340
    00356     virtual DOMNodeList   * getElementsByTagNameNS(const XMLCh *namespaceURI,
    00357                                                    const XMLCh *localName) const = 0;
    00358
    00369     virtual bool         hasAttribute(const XMLCh *name) const = 0;
    00370
    00383     virtual bool         hasAttributeNS(const XMLCh *namespaceURI,
    00384                                         const XMLCh *localName) const = 0;
    00386
    00389
    00408     virtual void setIdAttribute(const XMLCh* name) = 0;
    00409
    00410
    00428     virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName) = 0;
    00429
    00430
    00431
    00447     virtual void setIdAttributeNode(const DOMAttr *idAttr) = 0;
    00448
    00449
    00450
    00459     virtual const DOMTypeInfo* getTypeInfo() const = 0;
    00460
    00462
    00463 };
    00464
    00465 XERCES_CPP_NAMESPACE_END
    00466
    00467 #endif
    00468
    00469
    00470

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