The document discusses XML::Liberal, a Perl module that allows XML parsers to successfully parse XML documents that contain errors. It provides examples of how XML::Liberal can be used to override an existing XML parser like XML::LibXML to make it more liberal in parsing invalid XML. It also shows how XML::Liberal can be used to try parsing XML with a fallback parser if the primary parser fails due to errors in the XML.
33. use strict; use XML::FooParser; use XML::Liberal; eval { $doc = parse_xml($xml) }; if ($@){ my $p = XML::Liberal->new('LibXML'); my $d = $p->parse_string($xml); $xml = $d->toString(1); $doc = parse_xml($xml); }