summaryrefslogtreecommitdiff
path: root/src/xmlparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlparser.h')
-rw-r--r--src/xmlparser.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/xmlparser.h b/src/xmlparser.h
index a92a515..6f05650 100644
--- a/src/xmlparser.h
+++ b/src/xmlparser.h
@@ -31,32 +31,23 @@
#include "task.h"
#include "saxparser.h"
+#include <stack>
+#include "tasktree.h"
+
class XmlParser : public SAXParser {
public:
- XmlParser(std::string filename);
+ XmlParser(TaskTree *tree);
~XmlParser();
void startTag(std::string name, attributes_t &attr);
void endTag(std::string name);
- void characterData(std::string& data);
-
- TaskIdList tasklist;
-
-protected:
- int readData(char* data, size_t size);
+ void characterData(const std::string &data);
private:
- FILE* fp;
- task_t* task;
- std::string characterbuf;
-
- enum tag_t {
- title,
- desc,
- none
- };
-
- tag_t open_tagtype;
+ std::stack<taskid_t> parents;
+ std::string cdata;
+ node_t *node;
+ TaskTree *tree;
};
#endif/*__MUNIA_XMLPARSER_H__*/