Instead of calling xmllint via a shell script, use our virXMLValidator API to do it directly via libxml.