00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef skELEMENT_H
00022 #define skELEMENT_H
00023
00024 #include "skNode.h"
00025 #include "skAttribute.h"
00026
00030 class CLASSEXPORT skElement : public skNode
00031 {
00032 public:
00036 skElement(const skString& tagname);
00039 ~skElement();
00044 void appendChild(skNode * child);
00049 void removeAndDestroyChild(skNode * child);
00054 void removeChild(skNode * child);
00060 void setAttribute(const skString& name,const skString& value);
00066 skString getAttribute(const skString& name) const;
00071 skAttributeList& getAttributes();
00076 skNodeList& getChildNodes();
00081 skString getTagName() const;
00086 virtual NodeType getNodeType() const;
00091 virtual skNode * clone();
00096 virtual skString toString() const;
00101 virtual void write(skOutputDestination& out) const;
00105 bool operator==(const skElement& other) const;
00109 bool equals(const skNode& other) const;
00113 bool deepCompare(const skElement& other,bool check_tagname) const;
00114 protected:
00116 skAttribute * findAttribute(const skString& name) const;
00118 skString m_TagName;
00120 skAttributeList m_Attributes;
00122 skNodeList m_ChildNodes;
00123 };
00124 #endif
00125
00126