00001 #ifndef SDXDOCUMENTBUILDER_H
00002 #define SDXDOCUMENTBUILDER_H
00003
00004
00005 #include <list>
00006
00007 #include "SDXDocument.h"
00008 #include "SDXNode.h"
00009 #include "SDXContentHandler.h"
00010
00011 namespace SDX {
00012 namespace Helpers {
00016 class DocumentBuilder : public SDX::ContentHandler {
00017 public:
00018 DocumentBuilder();
00019
00023 Document* getDocument();
00024
00025 void startDocument();
00026 void startNode(std::string nodeName);
00027
00028 void writeAttribute(std::string name, std::string value);
00029
00030 void endNode();
00031 private:
00032 Document* m_document;
00033 std::list<Node*> m_nodes;
00034 };
00035 }
00036 }
00037
00038 #endif