XML file to validate:
XML Schema:
Drop your schema file here
Output:
Console:
xmllint info
Validate
XML file to validate:
Load XML data from files tab
XML Schema:
Load Schema data from files tab
Output:
Console:
xmllint info
Validate
JavaScript client side XML Schema Validation
Based on the xmllint.js imlementation
How to
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.