aboutsummaryrefslogtreecommitdiff
path: root/src/old/tests/xmlreadtest.cpp
blob: d061810cff38e3d358d4ea6323b13e019dbeb172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "xmlfilereader.h"
#include "xmlstringreader.h"
#include "xmlfilewriter.h"

int main( int argc, char *argv[] )
{
	if( argc < 4 )
	{
		printf("Usage: %s f <file in> <file out>\n", argv[0] );
		printf("       %s s <xml string> <file out>\n\n", argv[0] );
		return 0;
	}

	if( argv[1][0] == 'f' )
	{
		XmlFileReader r( argv[2], true );
//		XmlFileWriter w( argv[3], "\t", r.detatchRoot() );
//		w.write();
	}
	else if( argv[1][0] == 's' )
	{
		XmlStringReader r( argv[2], true );
		XmlFileWriter w(stdout, "\t", r.detatchRoot() );
		w.write();
	}

	return 0;
}