xsd-validator
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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.

Package Sidebar

Install

npm i xsd-validator

Weekly Downloads

1,321

Version

1.1.1

License

ISC

Unpacked Size

192 kB

Total Files

11

Last publish

Collaborators

  • deltazero