diff options
Diffstat (limited to 'tools/convert-xml-to-datadumper')
-rwxr-xr-x | tools/convert-xml-to-datadumper | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/convert-xml-to-datadumper b/tools/convert-xml-to-datadumper new file mode 100755 index 0000000..26d8c27 --- /dev/null +++ b/tools/convert-xml-to-datadumper @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w + +use strict; +use XML::Parser; +use XML::Dumper; +use Data::Dumper; + + +my $parser = new XML::Parser(Style => 'Tree'); +my $tree = $parser->parse( join ('', <stdin>) ); +my $dump = new XML::Dumper; +my $CONFIG = $dump->xml2pl($tree); + +print Data::Dumper->Dump([ $CONFIG ], [ $ARGV[0] ]); |