npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

parser-xml

0.1.0

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:2
$ npm install parser-xml
DailyWeeklyMonthlyYearly

parser-xml NPM version

parser-cache compatible XML parser.

Install

Install with npm

npm i parser-xml --save

Run tests

npm test

Usage

var parser = require('parser-xml');

parse

parser.parse(str, options, function(err, res) {
  if (err) { throw err; }
  console.log(res);
});

parseFile

parser.parseFile('fixtures/a.xml', function (err, res) {
  if (err) { throw err; }
  console.log(res);
});

parseSync

var res = parser.parseSync(str, options);
console.log(res);

API

parse

  • str {String|Object}: The object or string to parse.
  • options {Object|Function}: or cb callback function.
  • cb {Function}: callback function.

Parse the given str of XML and callback cb(err, data).

parseFile

  • str {String|Object}: The object or string to parse.
  • returns: {Object}

XML file support. Parse the given str of XML and callback cb(err, data).

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license


This file was generated by verb on November 24, 2014.