encoding specified in XML declaration is incorrect at line 1, column 30, byte 30: #### #### #!/usr/bin/perl use strict; use warnings; use XML::XPath; my $xp = XML::XPath->new(filename => '/xml_test.xml'); foreach my $row ($xp->findnodes('/HOME/Account')) { my $nodeset = $row->find('Record'); foreach my $node ( $nodeset->get_nodelist ) { my $account = $node->find( 'accnumber')->string_value; print "\n $account \n"; } }