#!/usr/bin/perl

use XML::Twig;

##my $file = 'c:\FG\18\flightgear\projects\VC8\flightgear.vcproj';
my $file = 'C:/FGCVS/FlightGear/data/keyboard.xml';
my $grp1 = 'key';
my $grp2 = 'name';
my $grp3 = 'desc';
my $twig = XML::Twig->new();

$twig->parsefile($file);

my $root = $twig->root;

foreach my $species ($root->children($grp1)){
    print $species->first_child_text($grp2);
#    print ' (' . $species->att('key') . ') ';
#    print ' (' . $species . ') ';
	print ' (';
    print $species->first_child_text($grp3);
#    print $species->first_child('conservation')->att('status');
	print ')';
    print "\n";
}
print "Done list ...\n";

$twig->print;
