diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2012-05-17 13:26:51 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2012-05-17 13:26:51 +0200 |
commit | dc52e1c5bac15f8c946e6ffac75d12a9e2e2780d (patch) | |
tree | 546751562645a84e1b60fe05539b07e963e99141 /src/xmlparser.cc | |
parent | 88fc1bfddff7a078ffad767fef44858165c0a69e (diff) |
Move createId() method to TaskTree. Store nextid in xml. Clean up XmlParser a bit.
Diffstat (limited to 'src/xmlparser.cc')
-rw-r--r-- | src/xmlparser.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xmlparser.cc b/src/xmlparser.cc index 112ea00..a362f95 100644 --- a/src/xmlparser.cc +++ b/src/xmlparser.cc @@ -31,8 +31,6 @@ #include "xml_encode_decode.h" -#define NOID 0xffffffff - XmlParser::XmlParser(TaskTree *t) : tree(t) { } @@ -48,6 +46,10 @@ void XmlParser::characterData(const std::string &data) void XmlParser::startTag(std::string name, attributes_t &attr) { + if(name == "tasktree") { + tree->nextid = atoi(xml_decode(attr["nextid"]).c_str()); + } + if(name == "task") { taskid_t id = atoi(xml_decode(attr["id"]).c_str()); @@ -74,7 +76,7 @@ void XmlParser::endTag(std::string name) parents.pop(); } - if (name == "title") { + if(name == "title") { node->data.title = cdata; } } |