abcd
asd
zxc
false
mail
mail
10405
nl
NL
free
free
0
Undefined
0
asdf@asdf.com
fdsa@zxczxc.com
werkgroep X.Y.Z.
6
false
mnbv
cvbb
bvcc
true
mail
mail
0
fr
BE
free
free
0
Undefined
0
qweqwe@qwe.com
0
false
####
my $file = shift || (print "NOTE: \tYou didn't provide the name of the file to be checked.\n" and exit);
my $twig = XML::Twig -> new ( twig_roots => { 'Account' => \& parsing } ); #'twig_roots' mode builds only the required sub-trees from the document while ignoring everything outside that twig.
$twig -> parsefile ($file);
sub parsing {
my ( $twig, $accounts ) = @_;
my %hash = @_;
my $ref = \%hash; #because was getting an error of Odd number of hash elements
return $ref;
$twig -> purge;
}