From: Andrew Ruthven Date: Wed, 28 Nov 2007 09:43:15 +0000 (+1300) Subject: Be a bit more forgiving on the XML we're receiving by use the XML::LibXML recover... X-Git-Tag: 0.5.2~4 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76de094f67551e831c92eaafd86dc488b97359ee;p=mythtv-status.git Be a bit more forgiving on the XML we're receiving by use the XML::LibXML recover mode. Warnings are still printed out if errors are recovered. I'm happy with this, hopefully it'll make people clean up their data feeds. --- diff --git a/ChangeLog b/ChangeLog index b63413d..d521ac6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2007-11-28 Andrew Ruthven Be more wary about processing what the backend has sent us. Add support for reading XML from a file. + Be a bit more forgiving on the XML we're receiving. 2007-11-23 Andrew Ruthven Don't set the background when changing the colour. diff --git a/bin/mythtv-status b/bin/mythtv-status index c9e1552..97d37f9 100755 --- a/bin/mythtv-status +++ b/bin/mythtv-status @@ -296,6 +296,7 @@ sub load_xml { # Parse the XML my $parser = XML::LibXML->new(); + $parser->recover(1); my $xml = eval { $parser->parse_string( $status ) }; if ($@) {