@richhouse83/xsd-validator
v1.0.0
Published
XSD schema validator — fork of xsd-validator with updated dependencies
Maintainers
Readme
Validating XMLs against XSD schema
NB: This is a straightforward fork of node-xsd-validator to update to use libxml2. That package is also no longer maintained so at some point a further update will be required.
Tool for simple validation of XML documents against a XSD schema. Using libxml2.
Installation
npm i @richhouse83/xsd-validatorUsage
import validateSchema from '@richhouse83/xsd-validator'
// returns true for valid documents
validateSchema('<xml...', '<xs:schema...')
// -> true
// returns Error[] for invalid valid documents
validateSchema('<xml...', '<xs:schema...')
// [error, error ... ]
Requirements
Make sure you have met the requirements for node-gyp. You DO NOT need to manually install node-gyp; it comes bundled with node.
