summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-11 20:15:20 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-18 19:11:42 (GMT)
commit92af1a97f318f7f623df3183e90e7e828fa2eeb9 (patch)
tree886d66feead5ca3c1d04152b570f7712be4a86c0 /Swiften/Parser/SerializingParser.cpp
parenteda3475756f88098de69d5bea05b328b53d7ec04 (diff)
downloadswift-92af1a97f318f7f623df3183e90e7e828fa2eeb9.zip
swift-92af1a97f318f7f623df3183e90e7e828fa2eeb9.tar.bz2
Make parser infrastructure parser aware.
Resolves: #492
Diffstat (limited to 'Swiften/Parser/SerializingParser.cpp')
-rw-r--r--Swiften/Parser/SerializingParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Parser/SerializingParser.cpp b/Swiften/Parser/SerializingParser.cpp
index 43dfc51..03b9575 100644
--- a/Swiften/Parser/SerializingParser.cpp
+++ b/Swiften/Parser/SerializingParser.cpp
@@ -7,7 +7,6 @@
#include "Swiften/Parser/SerializingParser.h"
#include "Swiften/Serializer/XML/XMLTextNode.h"
#include "Swiften/Base/foreach.h"
-#include <iostream>
namespace Swift {
@@ -16,8 +15,9 @@ SerializingParser::SerializingParser() {
void SerializingParser::handleStartElement(const std::string& tag, const std::string& ns, const AttributeMap& attributes) {
boost::shared_ptr<XMLElement> element(new XMLElement(tag, ns));
- for (AttributeMap::const_iterator i = attributes.begin(); i != attributes.end(); ++i) {
- element->setAttribute((*i).first, (*i).second);
+ // FIXME: Ignoring attribute namespace
+ foreach (const AttributeMap::Entry& e, attributes.getEntries()) {
+ element->setAttribute(e.getAttribute().getName(), e.getValue());
}
if (elementStack_.empty()) {