Include xmllint.js in the page.
//create an object
var Module = {
xml: xmlData,
schema: schemaData,
arguments: ["--noout", "--schema", schemaFileName, xmlFileName]
};
//and call function
var xmllint = validateXML(Module);
The Module properties xmlData and schemaData are strings of the content.