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;
}
1 2 3 4 5 6 7 8
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;
1 2 3 4 5 6 7 8 9
if(open my $fh, '>', $xmlFile ) { print $fh $xml; } else { warn "WARNING: Could not Open *$xmlFile* ($!)\n"; } if(open my $fh, '>', $dumperFile ) { print $fh Dumper $rhDiffResult; } else { warn "WARNING: Could not Open *$dumperFile* ($!)\n"; }
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
if( glob($options{output}) ) { my $xmlFile = glob($options{output}); my $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=>[]); if(open my $fh, '>', $xmlFile ) { print $fh $xml; } else { warn "WARNING: Could not Open *$xmlFile* ($!)\n"; } if(open my $fh, '>', $dumperFile ) { print $fh Dumper $rhDiffResult; } else { warn "WARNING: Could not Open *$dumperFile* ($!)\n"; } } 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; }
open( my $fh_out, '>', $xmlFile ) or die "Could not Open XML-File '$xmlFile': $!";