RSS Git Download  Clone
  lib Join text data when several blocks are used (ie. with CDATA blocks that have ] or [ characters inside) 10 years ago
  test adds json2xml parser 10 years ago
  .gitignore 19B initial commit 10 years ago
  .npmignore 13B bump version 10 years ago
  README.md 688B Edited README.md via GitHub 10 years ago
  index.js 35B initial commit 10 years ago
  package.json 422B upgrades node-expat version 10 years ago
  README.md
# Simple SAX-based XML2JSON Parser. It does not parse the following elements: * CDATA sections * Processing instructions * XML declarations * Entity declarations * Comments ## Installation npm install xml2json ## Usage ```javascript var parser = require('xml2json'); var xml = "<foo>bar</foo>"; var json = parser.toJson(xml); //returns an string containing the json structure by default console.log(json); ``` * if you want to get the Javascript object then you might want to invoke parser.toJson(xml, {object: true}); * if you want a reversible json to xml then you should use parser.toJson(xml, {reversible: true}); ## License Copyright 2011 BugLabs Inc. All rights reserved.