JSPM

  • Created
  • Published
  • Downloads 241
  • Score
    100M100P100Q84728F
  • License ISC

Xml Schema Library

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 xsdlibrary

yarn

$ yarn add xsdlibrary

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