summaryrefslogtreecommitdiff
path: root/src/xmlfilewriter.cpp
blob: b62fb117d7a576bf5557754ca317d475dc5e3465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <stdlib.h>
#include "xmlfilewriter.h"

XmlFileWriter::XmlFileWriter( const char *sFileName, const char *sIndent, XmlNode *pRoot ) :
	XmlWriter( sIndent, pRoot )
{
	this->sFileName = sFileName;
	fh = fopen( sFileName, "wt");
	fprintf( fh, "<?xml version=\"1.0\"?>\n");
}

XmlFileWriter::~XmlFileWriter()
{
	fclose( fh );
}

void XmlFileWriter::writeString( const char *sString )
{
	fprintf( fh, sString );
}