libdap++  Updated for version 3.8.2
XMLWriter.h
Go to the documentation of this file.
00001 /*
00002  * XMLWriter.h
00003  *
00004  *  Created on: Jul 28, 2010
00005  *      Author: jimg
00006  */
00007 
00008 #ifndef XMLWRITER_H_
00009 #define XMLWRITER_H_
00010 
00011 #include <libxml/encoding.h>
00012 #include <libxml/xmlwriter.h>
00013 
00014 #include <string>
00015 
00016 #include <InternalErr.h>
00017 
00018 using namespace std;
00019 
00020 class XMLWriter {
00021 private:
00022     // Various xml writer stuff
00023     xmlTextWriterPtr d_writer;
00024     xmlBufferPtr d_doc_buf;
00025     bool d_started;
00026     bool d_ended;
00027 
00028     string d_doc;
00029 
00030     void m_cleanup() ;
00031 
00032 public:
00033     XMLWriter(const string &pad = "    ");
00034     virtual ~XMLWriter();
00035 
00036     xmlTextWriterPtr get_writer() { return d_writer; }
00037     const char *get_doc();
00038 };
00039 
00040 #endif /* XMLWRITER_H_ */