diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-01-10 15:51:33 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-01-10 15:51:33 +0100 |
commit | d935b195a2246fa24d35df7c6fc354ae628a6777 (patch) | |
tree | c739e709ad3898df094d6779e50eaefa4f9cf82c /src/xmlparser.cc | |
parent | 93415d809989afc341472ea598579c924dc1e745 (diff) |
Added attributes to nodes as well as messages for manipulating and transporting them. Switched debug interface to hugin.
Diffstat (limited to 'src/xmlparser.cc')
-rw-r--r-- | src/xmlparser.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xmlparser.cc b/src/xmlparser.cc index a362f95..03a54a1 100644 --- a/src/xmlparser.cc +++ b/src/xmlparser.cc @@ -64,6 +64,10 @@ void XmlParser::startTag(std::string name, attributes_t &attr) parents.push(node->id); } + if(name == "attribute") { + attr_name = attr["name"]; + } + cdata = ""; } @@ -76,7 +80,7 @@ void XmlParser::endTag(std::string name) parents.pop(); } - if(name == "title") { - node->data.title = cdata; + if(name == "attribute") { + node->data.attributes[attr_name] = cdata; } } |