Skip to content

This package converts xml string or stream to js object

License

Notifications You must be signed in to change notification settings

cyhalothrin/node-xml2js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!' } }

About

This package converts xml string or stream to js object

Resources

License

Stars

Watchers

Forks

Packages

No packages published