{
  "name": "xml2json",
  "version": "0.3.2",
  "author": {
    "name": "Andrew Turley"
  },
  "email": "aturley@buglabs.net",
  "description": "Converts xml to json and viceverza, using node-expat.",
  "repository": {
    "type": "git",
    "url": "git://github.com/buglabs/node-xml2json.git"
  },
  "main": "index",
  "contributors": [
    {
      "name": "Camilo Aguilar",
      "email": "camilo.aguilar@gmail.com"
    }
  ],
  "dependencies": {
    "node-expat": "2.0.0"
  },
  "readme": "# Simple SAX-based XML2JSON Parser.\n\nIt does not parse the following elements: \n\n* CDATA sections (*)\n* Processing instructions\n* XML declarations\n* Entity declarations\n* Comments\n\n## Installation\n```\n$ npm install xml2json\n```\n\n## Usage \n```javascript\nvar parser = require('xml2json');\n\nvar xml = \"<foo>bar</foo>\";\nvar json = parser.toJson(xml); //returns a string containing the JSON structure by default\nconsole.log(json);\n```\n## API\n\n```javascript\nparser.toJson(xml, options);\n```\n```javascript\nparser.toXml(json, options);\n```\n\n### Options object\n\nDefault values:\n```javascript\nvar options = {\n    object: false,\n    reversible: false,\n    coerce: true,\n    sanitize: true,\n    trim: true \n};\n```\n\n* **object:** Returns a Javascript object instead of a JSON string\n* **reversible:** Makes the JSON reversible to XML (*)\n* **coerce:** Makes type coercion. i.e.: numbers and booleans present in attributes and element values are converted from string to its correspondent data types.\n* **trim:** Removes leading and trailing whitespaces as well as line terminators in element values.\n* **sanitize:** Sanitizes the following characters present in element values:\n\n```javascript\nvar chars =  {  \n    '<': '&lt;',\n    '>': '&gt;',\n    '(': '&#40;',\n    ')': '&#41;',\n    '#': '&#35;',\n    '&': '&amp;',\n    '\"': '&quot;',\n    \"'\": '&apos;'\n};\n```\n\n\n\n\n(*) xml2json tranforms CDATA content to JSON, but it doesn't generate a reversible structure.\n\n## License\n(The MIT License)\n\nCopyright 2012 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.",
  "readmeFilename": "README.md",
  "_id": "xml2json@0.3.2",
  "dist": {
    "shasum": "d50e79d96f6afc92d110170b4c4bdde37fd8b2b9"
  },
  "_from": "xml2json@latest",
  "_resolved": "https://registry.npmjs.org/xml2json/-/xml2json-0.3.2.tgz"
}
