blob: f6d8d8b1b39754234f769ebc55020a5196c4b0ea (
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 );
XmlWriter w( argv[3], "\t", r.detatchRoot() );
w.write();
}
return 0;
}
|