Help for this page
print XML::LibXML->get_last_error;
eval { $doc->validate; ... else { print "Doc valid\n"; }