blob: 003d3832928dbcb3343236f153169771fd584ee9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/perl -w
# In 2.0beta1 XML was used to store all relevant data
# 2.0beta2 ditched XML and went for Data::Dumper
# This script takes the XML data from STDIN and
# prints the data in Data::Dumper perl style to stdout
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] ]);
|