Parsing to a DOM Object

use XML::LibXML;

my $file = 'rates.html';

my $parser = XML::LibXML->new();
$parser->recover(1);
my $dom = $parser->parse_html_file($file) or die "parse error";