00001 #ifndef FIELDNODE_H_PROTECTOR
00002 #define FIELDNODE_H_PROTECTOR
00003
00004 #include <string>
00005
00006 namespace afl
00007 {
00008 class XMLParser;
00009
00013 class XMLNode
00014 {
00015 protected:
00020 XMLNode(XMLParser* parser);
00021
00022 public:
00027 virtual ~XMLNode() { }
00028
00032 virtual XMLNode* getFirstChild() const = 0;
00033
00038 virtual XMLNode* getNextSibling() const = 0;
00039
00047 virtual std::string getNamedAttribute(const std::string& name) const = 0;
00048
00052 virtual std::string getName() const = 0;
00053
00058 virtual std::string getText() const = 0;
00059
00064 virtual std::string toString() const = 0;
00065
00069 XMLParser* getParser() const;
00070
00071 private:
00072 mutable XMLParser* _parser;
00073 };
00074
00075 }
00076
00077 #endif
00078