{"id":15645870,"url":"https://github.com/nikku/node-xsd-schema-validator","last_synced_at":"2025-04-12T23:39:20.224Z","repository":{"id":14806633,"uuid":"17528940","full_name":"nikku/node-xsd-schema-validator","owner":"nikku","description":"A schema (XSD) validator for NodeJS","archived":false,"fork":false,"pushed_at":"2025-01-23T20:15:38.000Z","size":234,"stargazers_count":54,"open_issues_count":3,"forks_count":23,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-12T23:39:14.790Z","etag":null,"topics":["nodejs","xsd-validation"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/xsd-schema-validator","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"citiususc/hipster","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/XMLValidator.java","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["nikku"]}},"created_at":"2014-03-07T22:09:34.000Z","updated_at":"2025-03-11T13:51:08.000Z","dependencies_parsed_at":"2024-06-18T14:04:32.249Z","dependency_job_id":"99b224d5-4840-4a7f-bcf5-cd640a576fcb","html_url":"https://github.com/nikku/node-xsd-schema-validator","commit_stats":{"total_commits":102,"total_committers":5,"mean_commits":20.4,"dds":0.07843137254901966,"last_synced_commit":"5fcb90a4c37907bc17eb16d236858a4583ed0079"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fnode-xsd-schema-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fnode-xsd-schema-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fnode-xsd-schema-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fnode-xsd-schema-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikku","download_url":"https://codeload.github.com/nikku/node-xsd-schema-validator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","xsd-validation"],"created_at":"2024-10-03T12:10:24.410Z","updated_at":"2025-04-12T23:39:20.197Z","avatar_url":"https://github.com/nikku.png","language":"JavaScript","funding_links":["https://github.com/sponsors/nikku"],"categories":[],"sub_categories":[],"readme":"# xsd-schema-validator\n\n[![CI](https://github.com/nikku/node-xsd-schema-validator/actions/workflows/CI.yml/badge.svg)](https://github.com/nikku/node-xsd-schema-validator/actions/workflows/CI.yml)\n\nA (XSD) schema validator for [NodeJS](nodejs.org) that uses [Java](https://www.java.com) to perform the actual validation. [:arrow_right: Why?](#why)\n\n\n## Prerequisites\n\nUnder the hood, this utility uses Java to do the actual validation. \n\nIt assumes that `javac` and `java` are on the path. If a `JAVA_HOME` environment variable exists it uses that to locate an installed JDK. \n\nOn some platforms, i.e. [Mac OSX](http://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/) you need to define `JAVA_HOME` manually.\n\n\n## Installation\n\nInstall the package via [npm](http://npmjs.org):\n\n```\nnpm install --save xsd-schema-validator\n```\n\n\n## Usage\n\nUse in your application:\n\n```javascript\nvar validator = require('xsd-schema-validator');\n\nvar xmlStr = '\u003cfoo:bar /\u003e';\n\ntry {\n  const result = await validator.validateXML(xmlStr, 'resources/foo.xsd');\n\n  result.valid; // true\n} catch (err) {\n  console.error('validation error', err);\n}\n```\n\nYou may validate readable streams:\n\n```javascript\nvar xmlStream = fs.createReadableStream('some.xml');\n\nconst result = await validator.validateXML(xmlStream);\n```\n\nYou may validate files, too:\n\n```javascript\nconst result = validator.validateXML({ file: 'some.xml' }, ...);\n```\n\n## Why\n\nBecause Java can do schema validation and NodeJS cannot.\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikku%2Fnode-xsd-schema-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikku%2Fnode-xsd-schema-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikku%2Fnode-xsd-schema-validator/lists"}