You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

xsdlibrary

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xsdlibrary

Xml Schema Library


Version published
Weekly downloads
313
increased by30.42%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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
  • Detect XML or XML Schema
  • Validate XML Schema
ToDo
  • XML Schema to JSON Schema

Installation

npm

$ npm install xsdlibrary

yarn

$ yarn add xsdlibrary

Usage

import {
    xml2xsd,
    xsd2jsonSchema,
    json2xsd,
    validateXml,
    detectXmlSchema,
    jsonSchema2xsd
} from xsdlibrary;

Convert XML data to XML Schema(XSD)

const xmlString = ``; // your xml string
xml2xsd(xmlString); // returns xml schema

Convert XML Schema to Json Schema

const xsdString = ""; // your xml schema string
xsd2jsonSchema(xsdString); // returns "xml" or "xsd" or an error object if none

Convert JSON Schema to XML Schema

const jsonObj = {}; // your javascript object
jsonSchema2xsd(jsonObj); // returns xml schema

Validate XML or XML Schema

const xmlString = ""; // your xml or xml schema string
validateXml(xmlString); // returns true if valid or an error object

Detect XML or XML Schema

const string = ""; // your xml or xml schema string
detectXmlSchema(string); // returns "xml" or "xsd" or an error object if none

Keywords

FAQs

Package last updated on 06 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc