XML::LibXML is very verbose about any little issues it encounters,
just hide them.
In this case this is to fix encountering an unknown unicode
character - � .
clean_xml(\$status);
+ # Try and hide any error messages thar XML::LibXML insists on printing out.
+ open my $olderr, ">&STDERR";
+ open(STDERR, "> /dev/null") || die "Can't redirect stderr to /dev/null: $!";
+
my $xml = eval { $parser->parse_string( $status ) };
+ close (STDERR);
+ open (STDERR, ">&$olderr");
+
if ($@) {
die "Failed to parse XML: $@\n";
}