JSPM

sax-xml2json

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q23023F
  • License ISC

convert xml to json using sax parser

Package Exports

  • sax-xml2json

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 (sax-xml2json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sax-xml2json

A sax-style parser for converting XML and HTML to JSON.

Designed with node in mind, but should work fine in the browser or other CommonJS implementations.

What This Is

  • A very simple tool to convert XML file to JSON object.

Usage

var convert = require("sax-xml2json");
convert.toJson("./standard.xml", function (error, result) {
    console.log(result);
});

Reporting Problems

It's best to write a failing test if you find an issue. I will always accept pull requests with failing tests if they demonstrate intended behavior, but it is very hard to figure out what issue you're describing without a test. Writing a test is also the best way for you yourself to figure out if you really understand the issue you think you have with sax-xml2json.