Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation failing with "invalid xml" for incorrect file path #24

Open
Lukenickerson opened this issue May 10, 2021 · 1 comment
Open

Comments

@Lukenickerson
Copy link

Describe the Bug

When providing the wrong path to a file, the error given is invalid xml (status=WITH_ERRORS). Nothing in the error points to the real problem: the path provided is not a file.

Steps to Reproduce

const validator = require('xsd-schema-validator');
const schemaFile = './path/to/schema.xsd';
const file = './foo.xml'; // Wrong path - file does not exist
validator.validateXML({ file }, schemaFile, function(err, result) {
   if (err) throw err;
});

Expected Behavior

Error should give some indication that the file you're trying to test is not actually where you think it was.

Environment

  • Node v14.16.0
  • OS: Windows
  • Version 0.7.0
@Lukenickerson Lukenickerson added the bug Something isn't working label May 10, 2021
@nikku
Copy link
Owner

nikku commented May 10, 2021

Thanks for raising this issue. Would you like to contribute a fix via a PR?

@nikku nikku added pr welcome and removed bug Something isn't working labels Dec 9, 2021
@nikku nikku added ready and removed backlog labels Jan 31, 2024
@nikku nikku added backlog and removed ready labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants