00001 #ifndef SDXCONTENTPRINTER_H 00002 #define SDXCONTENTPRINTER_H 00003 00004 // STD 00005 #include <vector> 00006 00007 #include "SDXContentHandler.h" 00008 00009 namespace SDX { 00010 namespace Helpers { 00014 class ContentPrinter : public SDX::ContentHandler { 00015 public: 00020 ContentPrinter(ContentHandler* contentHandler = 0); 00021 00025 void setContentHandler(ContentHandler*); 00026 00027 void startDocument(); 00028 void startNode(std::string); 00029 void writeAttribute(std::string, std::string); 00030 void endNode(); 00031 void endDocument(); 00032 private: 00033 ContentHandler* m_contentHandler; 00034 00035 std::vector<std::string> m_openNodes; 00036 }; 00037 } 00038 } 00039 00040 #endif
1.5.8