#Example Script 1
use strict;
use warnings;
use Data::Dumper;
use XML::Simple;
use Getopt::Long;
my $output = '';
my $debug = 0;
my $path;
GetOptions('path=s' => \$path,'output=s' => \$output, 'debug=i' => \$debug);
if($output eq ''){
die ("parameter --output=s is missing");
}
open my $xmloutput, ">", $outputFile or die "can not open $outputFile ";
print $xmloutput "\n\n\n";
my $parser = new XML::Simple;
my $data = $parser->XMLin("$path");
print $xmloutput " \n";
print $xmloutput " $data \n";
print $xmloutput " \n";
print $xmloutput " \n";
close $xmloutput;
####
EXAMPLE 2
use strict;
use warnings;
use Data::Dumper;
use XML::Simple;
use Getopt::Long;
my $output = '';
my $debug = 0;
my $path;
GetOptions('path=s' => \$path,'output=s' => \$output, 'debug=i' => \$debug);
if($output eq ''){
die ("parameter --output=s is missing");
}
open my $xmloutput, ">", $outputFile or die "can not open $outputFile ";
print $xmloutput "\n\n\n";
my $parser = new XML::Simple;
my $data = $parser->XMLin("$path");
print $xmloutput " \n";
print $xmloutput " $data \n";
print $xmloutput " \n";
print $xmloutput " \n";
close $xmloutput;