#!/bin/perl -w use strict; use Text::Iconv; use XML::Simple; my $converter= Text::Iconv->new("utf8", "ISO-8859-1") or die "cannot generate the converter"; # note that if you want the text with XML::Parser # Objects style you will need to get # $doc->[0]->{Kids}->[0]->{Text} my $doc= XMLin( \*DATA); my $latin1_text= $converter->convert( $doc); print "text: $latin1_text (was $doc)\n"; __DATA__ espaņol