@cyhalothrin/node-xml2js

0.1.1 • Public • Published

node-xml2js

This package converts xml string or stream to js object. Uses htmlparser2.

Usage

const parse = require('node-xml2js');

const xml = '<tag attr="value">Hello, world!</tag>';

parse(xml, (err, obj) => {
  console.log(obj);
});

// prints
// { _: '', tag: { '$': { attr: 'value' }, _: 'Hello, world!' } }

Readme

Keywords

Package Sidebar

Install

npm i @cyhalothrin/node-xml2js

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • cyhalothrin