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 IMPORT_C skElement(const skString& tagname);
00039 IMPORT_C virtual ~skElement();
00045 IMPORT_C void appendChild(skNode * child);
00050 IMPORT_C void removeAndDestroyChild(skNode * child);
00055 IMPORT_C void removeChild(skNode * child);
00062 IMPORT_C void setAttribute(const skString& name,const skString& value);
00068 IMPORT_C bool removeAttribute(const skString& name);
00074 IMPORT_C skString getAttribute(const skString& name) const;
00075 #ifdef __SYMBIAN32__
00076
00082 IMPORT_C skString getAttribute(const TDesC& name) const;
00083 #endif
00084
00088 IMPORT_C skAttributeList& getAttributes();
00093 IMPORT_C skNodeList& getChildNodes();
00098 IMPORT_C skString getTagName() const;
00103 virtual IMPORT_C NodeType getNodeType() const;
00109 virtual IMPORT_C skNode * clone();
00115 virtual IMPORT_C skString toString() const;
00121 virtual IMPORT_C void write(skOutputDestination& out) const;
00125 bool IMPORT_C operator==(const skElement& other) const;
00129 bool IMPORT_C equals(const skNode& other) const;
00133 bool IMPORT_C deepCompare(const skElement& other,bool check_tagname) const;
00134 protected:
00136 skString m_TagName;
00138 skAttributeList m_Attributes;
00140 skNodeList m_ChildNodes;
00141 };
00142 #endif
00143
00144