Package Exports
- xsdlibrary
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xsdlibrary) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
XSD Library
XML Schema library to convert XML to XSD (XML Schema) using pure javascript.
- Convert XML to XML Schema
- Convert JSON (JS Object) to XML Schema
- XML to JSON Schema
ToDo
- XML Schema to JSON Schema
Installation
npm
$ npm install xsdlib
yarn
$ yarn add xsdlib
Usage
import { xml2xsd, json2xsd } from xsdlib;
const xmlString = `<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>`; // your xml string
const xmlSchema = xml2xsd(xmlString);
console.log(xmlSchema);
// returns xml schema