Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
xsd-schema-validator
Advanced tools
A (XSD) schema validator for NodeJS that uses Java to perform the actual validation. :arrow_right: Why?
Under the hood, this utility uses Java to do the actual validation.
It assumes that javac
and java
are on the path. If a JAVA_HOME
environment variable exists it uses that to locate an installed JDK.
On some platforms, i.e. Mac OSX you need to define JAVA_HOME
manually.
Install the package via npm:
npm install --save xsd-schema-validator
Use in your application:
var validator = require('xsd-schema-validator');
var xmlStr = '<foo:bar />';
try {
const result = await validator.validateXML(xmlStr, 'resources/foo.xsd');
result.valid; // true
} catch (err) {
console.error('validation error', err);
}
You may validate readable streams:
var xmlStream = fs.createReadableStream('some.xml');
const result = await validator.validateXML(xmlStream);
You may validate files, too:
const result = validator.validateXML({ file: 'some.xml' }, ...);
Because Java can do schema validation and NodeJS cannot.
MIT
0.10.0
CHORE
: simplify path resolutionCHORE
: log setup error with human readable messageCHORE
: require Node >= 18FAQs
A (XSD) schema validator for nodejs
The npm package xsd-schema-validator receives a total of 13,624 weekly downloads. As such, xsd-schema-validator popularity was classified as popular.
We found that xsd-schema-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.