bes  Updated for version 3.20.6
BESXMLWriter.h
1 /*
2  * BESXMLWriter.h
3  *
4  * Created on: Jul 28, 2010
5  * Author: jimg
6  */
7 
8 // Copyright (c) 2013 OPeNDAP, Inc. Author: James Gallagher
9 // <jgallagher@opendap.org>, Patrick West <pwest@opendap.org>
10 // Nathan Potter <npotter@opendap.org>
11 //
12 // modify it under the terms of the GNU Lesser General Public License
13 // as published by the Free Software Foundation; either version 2.1 of
14 // the License, or (at your option) any later version.
15 //
16 // This library is distributed in the hope that it will be useful, but
17 // WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 //
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 // 02110-1301 U\ SA
24 //
25 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI.
26 // 02874-0112.
27 #ifndef XMLWRITER_H_
28 #define XMLWRITER_H_
29 
30 #include <libxml/encoding.h>
31 #include <libxml/xmlwriter.h>
32 
33 #include <string>
34 
35 class BESXMLWriter {
36 private:
37  // Various xml writer stuff
38  xmlTextWriterPtr d_writer;
39  xmlBufferPtr d_doc_buf;
40  bool d_started;
41  bool d_ended;
42  std::string d_ns_uri;
43 
44  std::string d_doc;
45 
46  void m_cleanup() ;
47 
48 public:
49  BESXMLWriter();
50  virtual ~BESXMLWriter();
51 
52  xmlTextWriterPtr get_writer() { return d_writer; }
53  // string get_ns_uri() const { return d_ns_uri; }
54  const char *get_doc();
55 };
56 
57 #endif /* XMLWRITER_H_ */
BESXMLWriter
Definition: BESXMLWriter.h:35