summaryrefslogtreecommitdiff
path: root/src/old/xmlfilewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/old/xmlfilewriter.cpp')
-rw-r--r--src/old/xmlfilewriter.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/old/xmlfilewriter.cpp b/src/old/xmlfilewriter.cpp
new file mode 100644
index 0000000..3c6fb41
--- /dev/null
+++ b/src/old/xmlfilewriter.cpp
@@ -0,0 +1,28 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include "xmlfilewriter.h"
4
5XmlFileWriter::XmlFileWriter( const char *sFileName, const char *sIndent, XmlNode *pRoot ) :
6 XmlWriter( sIndent, pRoot )
7{
8 this->sFileName = sFileName;
9 fh = fopen( sFileName, "wt");
10 fprintf( fh, "<?xml version=\"1.0\"?>\n");
11}
12
13XmlFileWriter::XmlFileWriter( FILE *fh, const char *sIndent, XmlNode *pRoot ) :
14 XmlWriter( sIndent, pRoot ),
15 fh( fh )
16{
17}
18
19XmlFileWriter::~XmlFileWriter()
20{
21 fclose( fh );
22}
23
24void XmlFileWriter::writeString( const char *sString )
25{
26 fputs( sString, fh );
27}
28