Xerces-C++ 3.1.2

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

DOMElement.hpp
Go to the documentation of this file.
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*
19 * $Id: DOMElement.hpp 792236 2009-07-08 17:22:35Z amassari $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_DOMELEMENT_HPP)
23 #define XERCESC_INCLUDE_GUARD_DOMELEMENT_HPP
24
25 #include <xercesc/util/XercesDefs.hpp>
26 #include <xercesc/dom/DOMNode.hpp>
27
28 XERCES_CPP_NAMESPACE_BEGIN
29
30
31 class DOMAttr;
32 class DOMNodeList;
33 class DOMTypeInfo;
34
35
66 class CDOM_EXPORT DOMElement: public DOMNode {
67 protected:
68 // -----------------------------------------------------------------------
69 // Hidden constructors
70 // -----------------------------------------------------------------------
73 DOMElement() {}
74 DOMElement(const DOMElement &other) : DOMNode(other) {}
76
77 private:
78 // -----------------------------------------------------------------------
79 // Unimplemented constructors and operators
80 // -----------------------------------------------------------------------
83 DOMElement & operator = (const DOMElement &);
85
86 public:
87 // -----------------------------------------------------------------------
88 // All constructors are hidden, just the destructor is available
89 // -----------------------------------------------------------------------
96 virtual ~DOMElement() {};
98
99 // -----------------------------------------------------------------------
100 // Virtual DOMElement interface
101 // -----------------------------------------------------------------------
104 // -----------------------------------------------------------------------
105 // Getter methods
106 // -----------------------------------------------------------------------
116 virtual const XMLCh * getTagName() const = 0;
117
126 virtual const XMLCh * getAttribute(const XMLCh *name) const = 0;
127
136 virtual DOMAttr * getAttributeNode(const XMLCh *name) const = 0;
137
148 virtual DOMNodeList * getElementsByTagName(const XMLCh *name) const = 0;
149
150 // -----------------------------------------------------------------------
151 // Setter methods
152 // -----------------------------------------------------------------------
175 virtual void setAttribute(const XMLCh *name,
176 const XMLCh *value) = 0;
197 virtual DOMAttr * setAttributeNode(DOMAttr *newAttr) = 0;
198
215 virtual DOMAttr * removeAttributeNode(DOMAttr *oldAttr) = 0;
216
230 virtual void removeAttribute(const XMLCh *name) = 0;
232
246 virtual const XMLCh * getAttributeNS(const XMLCh *namespaceURI,
247 const XMLCh *localName) const = 0;
248
288 virtual void setAttributeNS(const XMLCh *namespaceURI,
289 const XMLCh *qualifiedName, const XMLCh *value) = 0;
290
305 virtual void removeAttributeNS(const XMLCh *namespaceURI,
306 const XMLCh *localName) = 0;
307
319 virtual DOMAttr * getAttributeNodeNS(const XMLCh *namespaceURI,
320 const XMLCh *localName) const = 0;
321
343 virtual DOMAttr * setAttributeNodeNS(DOMAttr *newAttr) = 0;
344
360 virtual DOMNodeList * getElementsByTagNameNS(const XMLCh *namespaceURI,
361 const XMLCh *localName) const = 0;
362
373 virtual bool hasAttribute(const XMLCh *name) const = 0;
374
387 virtual bool hasAttributeNS(const XMLCh *namespaceURI,
388 const XMLCh *localName) const = 0;
390
393
414 virtual void setIdAttribute(const XMLCh* name, bool isId) = 0;
415
416
435 virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId) = 0;
436
437
438
456 virtual void setIdAttributeNode(const DOMAttr *idAttr, bool isId) = 0;
457
458
459
466 virtual const DOMTypeInfo* getSchemaTypeInfo() const = 0;
467
469
470 // -----------------------------------------------------------------------
471 // DOMElementTraversal interface
472 // -----------------------------------------------------------------------
475 // -----------------------------------------------------------------------
476 // Getter methods
477 // -----------------------------------------------------------------------
484 virtual DOMElement * getFirstElementChild() const = 0;
485
492 virtual DOMElement * getLastElementChild() const = 0;
493
500 virtual DOMElement * getPreviousElementSibling() const = 0;
501
508 virtual DOMElement * getNextElementSibling() const = 0;
509
519 virtual XMLSize_t getChildElementCount() const = 0;
521 };
522
523 XERCES_CPP_NAMESPACE_END
524
525 #endif
526
527
528
DOMAttr
The DOMAttr class refers to an attribute of an XML element.
Definition: DOMAttr.hpp:57
DOMNodeList
The DOMNodeList interface provides the abstraction of an ordered collection of nodes.
Definition: DOMNodeList.hpp:45
XercesDefs.hpp
DOMElement::DOMElement
DOMElement(const DOMElement &other)
Definition: DOMElement.hpp:74
DOMElement::~DOMElement
virtual ~DOMElement()
Destructor.
Definition: DOMElement.hpp:96
DOMElement
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: DOMElement.hpp:66
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XMLSize_t
SIZE_T XMLSize_t
Definition: Xerces_autoconf_config.borland.hpp:86
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLCh
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139
DOMElement::DOMElement
DOMElement()
Definition: DOMElement.hpp:73
DOMTypeInfo
The DOMTypeInfo interface represent a type used by DOMElement or DOMAttr nodes, specified in the sche...
Definition: DOMTypeInfo.hpp:35
DOMNode.hpp