B value
D_Value
B value
D_Value
.
.
.
####
use strict;
use Switch;
use warnings;
use XML::Parser;
use XML::DOM::Lite qw(Parser :constants);
my $parser = Parser->new();
my $doc;
my $xml_path;
$doc = $parser->parseFile($xml_path, whitespace => 'strip');
my $A_list = $doc->getElementsByTagName('A');
if(defined($A_list)){
my $length = scalar(@$A_list);
for (my $cpt = 0; $cpt < $length; $cpt++) {
my $B = $doc->selectNodes("A/B")->index($cpt)->nodeValue();
my $D = $doc->selectNodes("A/C/D")->index($cpt)->nodeValue();
print "- $B / $D\n";
}
print "\n\n";
}