Skip to content

Commit

Permalink
docs: another update
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Jan 12, 2024
1 parent 6cef2ca commit d481b70
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ var validator = require('xsd-schema-validator');

var xmlStr = '<foo:bar />';

const result = await validator.validateXML(xmlStr, 'resources/foo.xsd');
try {
const result = await validator.validateXML(xmlStr, 'resources/foo.xsd');

result.valid; // true
result.valid; // true
} catch (err) {
console.error('validation error', err);
}
```

You may validate readable streams:
Expand Down

0 comments on commit d481b70

Please sign in to comment.