File indexing completed on 2025-01-30 10:27:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMELEMENTIMPL_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMELEMENTIMPL_HPP
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #include <xercesc/util/XercesDefs.hpp>
0036 #include <xercesc/util/XMLString.hpp>
0037 #include <xercesc/dom/DOMElement.hpp>
0038
0039 #include "DOMNodeBase.hpp"
0040 #include "DOMChildNode.hpp"
0041 #include "DOMNodeImpl.hpp"
0042 #include "DOMParentNode.hpp"
0043
0044 #include "DOMAttrMapImpl.hpp"
0045
0046 XERCES_CPP_NAMESPACE_BEGIN
0047
0048 class DOMTypeInfo;
0049 class DOMNodeList;
0050 class DOMAttrMapImpl;
0051 class DOMDocument;
0052
0053
0054
0055
0056 class CDOM_EXPORT DOMElementImpl: public DOMElement,
0057 public HasDOMNodeImpl, public HasDOMParentImpl, public HasDOMChildImpl {
0058 public:
0059 DOMNodeImpl fNode;
0060 DOMParentNode fParent;
0061 DOMChildNode fChild;
0062 DOMAttrMapImpl *fAttributes;
0063 DOMAttrMapImpl *fDefaultAttributes;
0064 const XMLCh *fName;
0065
0066 public:
0067 DOMElementImpl(DOMDocument *ownerDoc, const XMLCh *name);
0068
0069 DOMElementImpl(const DOMElementImpl &other, bool deep=false);
0070 virtual ~DOMElementImpl();
0071
0072 public:
0073
0074 DOMNODE_FUNCTIONS;
0075
0076
0077 DOMNODEIMPL_DECL;
0078 DOMPARENTIMPL_DECL;
0079 DOMCHILDIMPL_DECL;
0080
0081 public:
0082
0083 virtual const XMLCh* getAttribute(const XMLCh *name) const;
0084 virtual DOMAttr* getAttributeNode(const XMLCh *name) const;
0085 virtual DOMNodeList* getElementsByTagName(const XMLCh *tagname) const;
0086 virtual const XMLCh* getTagName() const;
0087 virtual void removeAttribute(const XMLCh *name);
0088 virtual DOMAttr* removeAttributeNode(DOMAttr * oldAttr);
0089 virtual void setAttribute(const XMLCh *name, const XMLCh *value);
0090 virtual DOMAttr* setAttributeNode(DOMAttr *newAttr);
0091 virtual void setReadOnly(bool readOnly, bool deep);
0092
0093
0094 virtual const XMLCh* getAttributeNS(const XMLCh *namespaceURI,
0095 const XMLCh *localName) const;
0096 virtual void setAttributeNS(const XMLCh *namespaceURI,
0097 const XMLCh *qualifiedName,
0098 const XMLCh *value);
0099 virtual void removeAttributeNS(const XMLCh *namespaceURI,
0100 const XMLCh *localName);
0101 virtual DOMAttr* getAttributeNodeNS(const XMLCh *namespaceURI,
0102 const XMLCh *localName) const;
0103 virtual DOMAttr* setAttributeNodeNS(DOMAttr *newAttr);
0104 virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI,
0105 const XMLCh *localName) const;
0106 virtual bool hasAttribute(const XMLCh *name) const;
0107 virtual bool hasAttributeNS(const XMLCh *namespaceURI,
0108 const XMLCh *localName) const;
0109
0110
0111 virtual void setIdAttribute(const XMLCh* name, bool isId);
0112 virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId);
0113 virtual void setIdAttributeNode(const DOMAttr *idAttr, bool isId);
0114 virtual const DOMTypeInfo * getSchemaTypeInfo() const;
0115
0116
0117 virtual DOMAttr* setDefaultAttributeNode(DOMAttr *newAttr);
0118 virtual DOMAttr* setDefaultAttributeNodeNS(DOMAttr *newAttr);
0119 virtual DOMAttrMapImpl* getDefaultAttributes() const;
0120
0121
0122 virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name);
0123
0124
0125 virtual DOMElement * getFirstElementChild() const;
0126 virtual DOMElement * getLastElementChild() const;
0127 virtual DOMElement * getPreviousElementSibling() const;
0128 virtual DOMElement * getNextElementSibling() const;
0129 virtual XMLSize_t getChildElementCount() const;
0130
0131 protected:
0132
0133 virtual void setupDefaultAttributes();
0134
0135
0136 DOMElement* getFirstElementChild(const DOMNode* n) const;
0137 DOMElement* getLastElementChild(const DOMNode* n) const;
0138 DOMNode* getNextLogicalSibling(const DOMNode* n) const;
0139 DOMNode* getPreviousLogicalSibling(const DOMNode* n) const;
0140
0141 private:
0142
0143
0144
0145 DOMElementImpl & operator = (const DOMElementImpl &);
0146 };
0147
0148 XERCES_CPP_NAMESPACE_END
0149
0150 #endif