Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

xsd-validator

deltazero-cz19.6kISC1.1.1TypeScript support: included

Validating XMLs against XSD schema

XSD, XML, Schema, Schema Validation, Schema Validator, XSD Schema, XSD Schema Validation, XSD Schema Validator, XML Schema, XML Schema Validation, XML Schema Validator

readme

Validating XMLs against XSD schema

Tool for simple validation of XML documents against a XSD schema. Using libxml via libxmljs.

Installation

npm i xsd-validator

Usage

import validateSchema from '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.