Questo è lo script in perl cha trasforma xml in testo.
Ovviamente cambia le variabili secondo i tuoi tag.
ciao


#!C:\Perl\bin\perl.exe

require XML::Parser;

$|=1;

unlink "../wave/sint.wav";


#$xmlfile=$ENV{'HTTP_REFERER'};
#$xmlfile="../xml/notiziario.xml";

$url=$ENV{'HTTP_REFERER'};
$url =~ s/(http:\/\/)+(.*\/)/..\/xml\//;
$xmlfile=$url;


$controllo=0;
$contaimmagini=0;

if ( ! $xmlfile ) {
print "Impossibile processare la pagina $xmlfile.\n";
exit;
}

my ($elemento_corrente,$titolopagina, $data, $argomento, $titolo, $occhiello, @corpo, $fonte, $firma, $tmp, $testo);


$l1=<DATA>;
$l2=<DATA>;
$header=$l1 . $l2 . $l1;
$line=$l1;
$tmp = "../Dati";
#$tmp = "http://localhost/PASSO1/Dati";


$p2 = new XML::Parser(Handlers => {Start => \&handle_start,
End => \&handle_end,
Char => \&handle_char});


$p2->parsefile($xmlfile);


exit;



#Implementazione delle subroutine

sub handle_start
{
my ($pkg,$elemento,%attr) = @_;

$elemento_corrente = $elemento;
if ( $elemento =~ /notiziario/i )
{
if (! -e $tmp )
{
mkdir $tmp, 0755 ;
}
unlink "$tmp/testo.txt";

}
elsif ($elemento =~ /notizia/i)
{

$id=$attr{ID};
$data=$attr{DATA};
$argomento=$attr{ARGOMENTO};
}
elsif ($elemento =~ /immagine/i)
{
$contaimmagini++;
@didascalia[$contaimmagini]=$attr{DIDASCALIA};
}
elsif($elemento =~ /link/i)
{
$contalink++;
@nome[$contalink]=$attr{NOME};
}
$mailfile= "$tmp/testo.txt";
open (OUT, ">>$mailfile");
#$mailfile= "$tmp/Parlante.pl";
#open (OUT, ">>$mailfile");

}


sub handle_end {
my ($pkg,$elemento,%attr) = @_;
if ( $elemento =~ /notizia/i )
{
$controllo++;
if ($controllo==$id)
{


#print OUT "The title of this page is: ";
print OUT $titolopagina, "\n";

#print OUT "Page updates in: ";
#print OUT $data,"\n";

#print OUT $argomento,"\n";
#print OUT "Notice ",$id,"\n";
print OUT $titolo,"\n";
print OUT $occhiello,"\n";
print OUT $firma,"\n";
print OUT $fonte,"\n";
print OUT $corpo,"\n";
print OUT $testo,"\n";
#print OUT "In this page there are: ",$contaimmagini," images.\n";
#for ($i=1;$i<=$contaimmagini;$i++)
# {
# print OUT "Image ",$i,":",$didascalia[$i],"\n";
# }
#print OUT "Links : \n";
#for ($i=1;$i<=$contalink;$i++)
# {
# print OUT "Premi ",$i,":",$nome[$i],"\n";
# }


$a=$ENV{'HTTP_REFERER'};
#print OUT $a;
}
close (OUT);

}
}


sub handle_char
{
$text = $_[1];
#print "$text\n";

if ( $elemento_corrente =~ /titolopagina/i )
{
($text !~ /^\s*$/) && ($titolopagina = $text);
}

if ( $elemento_corrente =~ /titolo/i )
{
($text !~ /^\s*$/) && ($titolo = $text);
}

elsif ( $elemento_corrente =~ /occhiello/i )
{
($text !~ /^\s*$/) && ($occhiello = $text);
}

elsif ( $elemento_corrente =~ /corpo/i )
{
($text !~ /^\s*$/) && ($corpo = $text);
}

elsif ( $elemento_corrente =~ /fonte/i )
{
($text !~ /^\s*$/) && ($fonte = $text);
}

elsif ( $elemento_corrente =~ /firma/i )
{
($text !~ /^\s*$/) && ($firma = $text);
}
elsif ( $elemento_corrente =~ /testo/i )
{
($text !~ /^\s*$/) && ($testo = $text);
}


}