use locale; use strict; use XML::Simple; if ($#ARGV != 0){ die "Usage : ", $0, " fichier_xml\n";} my $document = XMLin($ARGV[0]); my $source = $document->{"source"}; print "Fichier source : ",$source,"\n"; foreach my $phrase (@{$document->{"phrase"}}){ print "---PHRASE---\n"; foreach my $mot ( @{$phrase->{"mot"}} ){ print $mot->{"num"},"\t"; print $mot->{"forme"},"\t"; print $mot->{"lemme"},"\t"; print $mot->{"categorie"},"\n"; } }