summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/SerializingParser.h')
-rw-r--r--Swiften/Parser/SerializingParser.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Swiften/Parser/SerializingParser.h b/Swiften/Parser/SerializingParser.h
new file mode 100644
index 0000000..b1d4575
--- /dev/null
+++ b/Swiften/Parser/SerializingParser.h
@@ -0,0 +1,25 @@
+#ifndef SWIFTEN_SerializingParser_H
+#define SWIFTEN_SerializingParser_H
+
+#include "Swiften/Base/String.h"
+#include "Swiften/Parser/AttributeMap.h"
+#include "Swiften/Serializer/XML/XMLElement.h"
+
+namespace Swift {
+ class SerializingParser {
+ public:
+ SerializingParser();
+
+ void handleStartElement(const String& element, const String& ns, const AttributeMap& attributes);
+ void handleEndElement(const String& element, const String& ns);
+ void handleCharacterData(const String& data);
+
+ String getResult() const;
+
+ private:
+ std::vector< boost::shared_ptr<XMLElement> > elementStack_;
+ boost::shared_ptr<XMLElement> rootElement_;
+ };
+}
+
+#endif