(Windows xp, perl 5.10.1, cmd)
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
if( defined glob($options{output}) )
{
$xmlFile = glob($options{output});
$dumperFile = "$xmlFile.dmp";
print "\nINFO: Because of some problems with reading the xml file, a hashdump is also performed\n";
print " Name of the dumped hash is: '$dumperFile'\n";
my $xml = $xs->XMLout($rhDiffResult, KeepRoot=>1, NoAttr=>1, AttrIndent => 1 , KeyAttr=>[]);
open( my $fh_out, '>', $xmlFile ) or warn "WARNING: Could not Open *$xmlFile*\n";
open( my $fh_out_dmp, '>', $dumperFile ) or warn "WARNING: Could not Open *$dumperFile*\n";
print $fh_out $xml;
print $fh_out_dmp Dumper $rhDiffResult;
close $fh_out;
close $fh_out_dmp;
}
else
{
my $xml = $xs->XMLout($rhDiffResult, KeepRoot=>1, NoAttr=>1, AttrIndent => 1, KeyAttr => [] );
#$xs->XMLin( $xmlFile, KeepRoot => 1, NormaliseSpace => 1, ForceContent => 1, ForceArray => 1, KeyAttr => [] );
print $xml;
}