xml2json-node

2.0.0 • Public • Published

xml2json-node

Node wrapper around Cheedoong's c++ xml2json library with updated rapidjson and rapidxml libraries.

travis

Inspired by this awesome, unmaintained, library: https://github.com/node-monk/xml-conv-json

Install

npm i xml2json-node

Example / API

const xml2json = require('xml2json-node')

const example = async () => {
  const xmlString = `<person><name>Test</name><age>21</age></person>`
  const jsonString = await xml2json(xmlString) // {"person":{"name":"Test","age":"21"}}
  return JSON.parse(jsonString)
}

example() // { person: { name: 'Test', age: 21 } }

C++ sources:

Readme

Keywords

none

Package Sidebar

Install

npm i xml2json-node

Weekly Downloads

0

Version

2.0.0

License

ISC

Unpacked Size

942 kB

Total Files

49

Last publish

Collaborators

  • max.nachlinger