From d935b195a2246fa24d35df7c6fc354ae628a6777 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 10 Jan 2013 15:51:33 +0100 Subject: Added attributes to nodes as well as messages for manipulating and transporting them. Switched debug interface to hugin. --- src/xmlparser.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/xmlparser.cc') 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; } } -- cgit v1.2.3