blob: 5fbd02101f3a79a7086494d43e7b1afed04a7448 (
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.getRoot() );
w.write();
//XmlWriter::write( argv[3], r.getRoot(), "\t" );
}
else if( argv[1][0] == 's' )
{
XmlStringReader r( argv[2], true );
//XmlWriter::write( argv[3], r.getRoot(), "\t" );
}
return 0;
}
|