xmlfgkey3.pl to HTML.

index -|- end

Generated: Tue Feb 2 17:55:01 2010 from xmlfgkey3.pl 2007/11/28 683.

#!/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;

index -|- top

checked by tidy  Valid HTML 4.01 Transitional