From df415e392d1f071df658ce7c79a4b893be7c00db Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Wed, 28 Nov 2007 22:43:15 +1300 Subject: [PATCH] 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. --- ChangeLog | 1 + bin/mythtv-status | 1 + 2 files changed, 2 insertions(+) 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 ($@) { -- 2.30.2