summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/SerializingParser.cpp')
m---------Swiften0
-rw-r--r--Swiften/Parser/SerializingParser.cpp41
2 files changed, 0 insertions, 41 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/Parser/SerializingParser.cpp b/Swiften/Parser/SerializingParser.cpp
deleted file mode 100644
index f69e732..0000000
--- a/Swiften/Parser/SerializingParser.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "Swiften/Parser/SerializingParser.h"
-#include "Swiften/Serializer/XML/XMLTextNode.h"
-#include "Swiften/Base/foreach.h"
-#include <iostream>
-
-namespace Swift {
-
-SerializingParser::SerializingParser() {
-}
-
-void SerializingParser::handleStartElement(const String& tag, const 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);
- }
-
- if (elementStack_.empty()) {
- rootElement_ = element;
- }
- else {
- (*(elementStack_.end() - 1))->addNode(element);
- }
- elementStack_.push_back(element);
-}
-
-void SerializingParser::handleEndElement(const String&, const String&) {
- assert(!elementStack_.empty());
- elementStack_.pop_back();
-}
-
-void SerializingParser::handleCharacterData(const String& data) {
- if (!elementStack_.empty()) {
- (*(elementStack_.end()-1))->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(data)));
- }
-}
-
-String SerializingParser::getResult() const {
- return (rootElement_ ? rootElement_->serialize() : "");
-}
-
-}