diff options
Diffstat (limited to 'server/src/queryparser.cc')
-rw-r--r-- | server/src/queryparser.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/src/queryparser.cc b/server/src/queryparser.cc index 187bc76..fc64c76 100644 --- a/server/src/queryparser.cc +++ b/server/src/queryparser.cc @@ -29,6 +29,7 @@ QueryParser::QueryParser(std::string document) { this->document = document; + this->timestamp = 0; // Make sure we always contain a valid xml document. if(this->document == "") this->document = "<xml></xml>"; @@ -40,8 +41,17 @@ QueryParser::QueryParser(std::string document) void QueryParser::startTag(std::string name, std::map< std::string, std::string> attributes) { + if(name == "results") { + // What to do here!? + } + + if(name == "result") { + this->timestamp = atol(attributes["timestamp"].c_str()); + } + if(name == "group") { QueryResult q; + q.timestamp = this->timestamp; stack.back()->groups[attributes["name"]] = q; stack.push_back(&stack.back()->groups[attributes["name"]]); } |