/usr/share/doc/libxml-checker-perl/examples/testCheckDOM.pl is in libxml-checker-perl 0.13-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | use XML::DOM;
use XML::Checker;
use XML::Checker::DOM;
my $filename = shift;
my $parser = new XML::DOM::Parser (KeepCDATA => 1, NoExpand => 1);
my $dom = $parser->parsefile ($filename);
print $dom->toString;
# Uncomment the next line to stop checking when the first error is encountered.
#local $XML::Checker::FAIL = sub { die };
my $checker = new XML::Checker;
$dom->check ($checker);
|