{"_id":"xml-to-json-stream","_rev":"8-f6e89992809d27568645bd9010a539df","name":"xml-to-json-stream","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"xml-to-json-stream","version":"1.0.0","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"keywords":[],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"c77a80481af560e630dd62e48e6959f9c2375f3f","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-YLUL/4OKoUUCqweEChlvn21UiH1PLXkohxX62FDAnA1/p2r5JJIDXAbHlB5XYaOy0ytw4RqnuXmH9QONC2K1nQ==","shasum":"b631fb7e2f670be131892302528a848dc0518bfc","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.0.0.tgz","fileCount":9,"unpackedSize":23738,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNpIVWrQvdcCBbj4TlWywzJtxm/z7xvmoQYGkuNiV5kAiEA8Ij3EEvIgHK7ySsPzvtGEfznURaKSGrsiIkWGh2o5Fw="}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.0.0_1520010037753_0.3628650992734548"},"_hasShrinkwrap":false},"1.0.1":{"name":"xml-to-json-stream","version":"1.0.1","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"keywords":[],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"eed3d5e72da32123e5d444bc470285f1c8ab7373","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-173tHks821DzTOpga2lc+2KC/jGbUv0CgHFOcf8GIry/sukno5mI14BlRyaHSlppplxmCVwa1/UspR+/UfPLEQ==","shasum":"d5b7b2b9c594b4a2d52bca095f84c80f3d0da8c6","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.0.1.tgz","fileCount":9,"unpackedSize":23772,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHdzrw24h6gKA7QpOrdPZAJtFSbeSo28WTUEyJ3TSq8gIgWsmuID0JsKkI2M1vsRM3PbxyOriwSN1m1ZOWzalxMNw="}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.0.1_1520010949823_0.6106387936579121"},"_hasShrinkwrap":false},"1.0.2":{"name":"xml-to-json-stream","version":"1.0.2","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"keywords":["stream","xml to json","xml","json","transform stream","convert"],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"e8f4cacb8ef070ffc024f4589af27d312c26fc10","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-cQiHJFL/X8e0ejJVatjHzkVJfAvJIoSpHXyTD5olNQNfitzbM0PTn6vZNt6+YJKev4W5jGSYIXiR7J4cBDn4tg==","shasum":"8a1d2215c9a3bd534df5888aa2b02f50405e6c6c","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.0.2.tgz","fileCount":9,"unpackedSize":23885,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvHHhSpntXigJ+s6mIBDK6NsvJoDrQo9ZoMEt8nT2XnQIhAJi4iw248mefNbScUYx/Aesc8IQRcudTvmiyfg0XS5hN"}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.0.2_1520443085841_0.44090351365167946"},"_hasShrinkwrap":false},"1.0.3":{"name":"xml-to-json-stream","version":"1.0.3","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"keywords":["stream","xml to json","xml","json","transform stream","convert"],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"52d17b3feb581f0209fd3c79b886906f13d5129b","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.0.3","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-SR08q/j0e7KCV5yw1jnGNc4XrH2McWZiBWuK0dfuA4+ybalmoLA6RmylBhNcw3x3cvBMgrkQytRQK02XJLHBxQ==","shasum":"0f78df14bf6a06e7ad97ce0a7cd46ffd9711136a","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.0.3.tgz","fileCount":10,"unpackedSize":24586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba5FgCRA9TVsSAnZWagAAUnIP/RAurP5dNytQGyoKkeAb\naSYHuhPCqRFpg/nbTYRgEQvIU2DvdRZ0Jehh19aExPJMEZ0btJu82ciKMmPD\nHRDLR0NtWwnKeSRHK21OcM7wCy9JY+L1YhsnMwkS0F/9uVIhURQes3PIiAY9\nHlPXi5M+QB3kwoQJs/6SGlLvYXbfkk6KvIpaVPdrhr5gF1U/AWxWN4CrvOFM\noIfs3vJPe51/LH210LlpKa9lDVQTbr85UvvnE6pg+K5rr/fj9GEjohQq6E+o\nyPgdM1IuWndGVkQ0+jLJqRzrYTZXK8+XBGLY3LXKwx8exWzmzYwntlQoIHps\nCx3qLsIlxOydE1JDMYVVs+YeHHiroVcg0sptGmraP87x1N2JxLqCarP8Zoa9\nEoGaLkmebql/8kGrwMj/6AFEermpJ2RLtaD/ZrYUz7rPR5/OXzO11DQ/sYYQ\nXZp6CHji7iBr6WeSFVg6XJyBae7XdY5aARz2GbFmLGA6buoQTzib740TlqJ8\ny89bo1jJbrKqDNsRkFIYfb88IPAbXUr8xBNOeaAjIdD8guIzwPG/hNM2vt/L\nVar/0yWKCajPGZjvlIvkPPFHeHu2ycMD/R5ZW7VHuwlw3ZrX2m6Ov+tGLcmN\n8Z7NLanqm576A9tTpxzPmchYafDwcdNrlWJtwhRdoZ/o9cJznZKmyd7rw8ch\noA8V\r\n=bTEz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB73BYbOrStXev/19cMXzf6twFjHz0w9QLgsk8O1ibfBAiEA11kIEo660jbxbCesoBfsAkQfsBuYut/+zRz7Xt/CPHA="}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.0.3_1533776224237_0.7185679487890198"},"_hasShrinkwrap":false},"1.0.4":{"name":"xml-to-json-stream","version":"1.0.4","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"keywords":["stream","xml to json","xml","json","transform stream","convert"],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"1d2d260afb99551e4cbb869d5d2887eeadd39eb6","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.0.4","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-wKA+Blqfr2YfwsoxRkc3W+AcI3vIiC3DyBOQ6zR+mb8VXP6yfViiOqEMpRUGVTNwkYHVRyVU3CH4uUxKyMwKlg==","shasum":"1a142a2b2ba3d7355860c262e6f6cf05ef7ed86e","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.0.4.tgz","fileCount":10,"unpackedSize":27288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtCGDCRA9TVsSAnZWagAA7wUP/3v4X8+BK4DmDAg2QNVs\nXxFYHAq3UoKuuiEAjkDQ6iddCNlvwcBD7XWnl+On9pbUdivafmFuV/Nd4oyw\nUfFN3Oi/O07CJLkmQTU2XT4SnUHobeQd2DH+Eju9gZzJJJlkxfMOPvi65o6r\ncRFq6sMZsQIVVX35VCKXPKVGWejR9ubyPlDnzIRB+fcx5YImItgtxXlgtEsa\nYmsg7YXJ9xcqmt6+snCxVHh/+W9uW02pePnbupUVi12UXsas/HlZXaLaLd8v\n/iGZ1oCfgnVosZAWvozXIME/W7mMfc2AXGkiYEZcrlsAjEjuocnE18Pm5qeS\n8ap3ruT5z/i1sfepnJxAb5Rj928XSuWcJaMaLPSspnqgd5rWNWolTqnr5IJZ\ntoAnLvRJmSGXhIS5AcomZo5N2ITKMERiHRcMmG7UBNKVxriZXxHAlwgmi4YF\nKBs9hu66sTShkNIgNZR54E0/eWL1/O2mqjgL+3b3itW/mVDbSuL/GjjeUmLm\nZJmitVo7srVad67oHEyxbfrtW7BUUHpyjE0cJVARwzLlw3GlIguL0r7y84yS\nyBYUJmuJuNFIdmJJQPiRTuKpk8fGEtTsAb5vzPbwyRwP0VQhYzBom1iHlts0\nR/qSKSf/Gs507bh53T2NzmSSFzeXmP+YtHHBOmUiX5TodUm6mUkCXSHaskM7\nmoQc\r\n=3YWg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6580XeXyBumiGPfI8jbCWZHv0v92GzB7PyN/nxSVERgIgXog3dVsZogHlYW5B40hVNEnPIVfzUahZAKZUSOPFzX0="}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.0.4_1538531715317_0.8953615738425786"},"_hasShrinkwrap":false},"1.0.5":{"name":"xml-to-json-stream","version":"1.0.5","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"keywords":["stream","xml to json","xml","json","transform stream","convert"],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"30d38e1f45bfeb2c966cf6a34b3eaa0399700e15","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.0.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-djyJKP+nrFxragkI3WLV/LEUU7DULO6oa8qtA8OqgTCrAS/AgoFfD8JPDkYYvLRUT4ZKzmAHsuFkOKzkCvsqhw==","shasum":"5d5cfc6bab7479fcf0e2757d0fd798f92424c660","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.0.5.tgz","fileCount":10,"unpackedSize":30148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAVABCRA9TVsSAnZWagAAG/8P+weO7QfrO1sJyZ6CN28c\nVrE+2fLL9OQB0/3zWI45AB+swId/t34XTmPAtHFFcXk+iKrjX5q4vQZf9WYg\nnu/mjU5vOIxBF+lzSSNNeGepd7UHMz/OTGLmbPgrAgkbJrGyoxo9dO2S2ZNh\nEVy7RAUKZgkxH50tGCKdrdemrvx5o2kx91Vk98NtBTt4eF7QvIHgtcN/katP\nI6nwoOwdL4w/pm62hCxc1KlmtLeCfQMrhzsYI5F8kJDUGEHUdE7wtUfO+E4k\nryrEMwhuZHCyEQBFFoObgBGjH3BLiNWXfs10JgzHbRIrBIblNKU6FpUEA/Cj\nxBmt5bLIP6KJ1SeL8MvkPGjjBJ39I0c83ywL6dCWo68apeTXZ5LHELYQWKZp\nXuL03Xl2gYfrdtAQ7mIufEsm2xaLWq39SytlcdDUB4WI6Raz1NVYUOw8NndU\nSkxZ1wJ9PO3zemNUEEA3qmX4KavTTsejRhdmcIMhxOTR2zlp+BzvPIHcoWYD\n6BoOspS0Mep1NIdKH2MOzdWPnzac8WrsjLUfzClxzN/nR9G+/BQdC2bJmMHV\n5c5GiZkYWmv3zQ65BBhMDtbqGYSiBO5hUjGcxGEXzhiiDswOAzmqy5g3hBKW\nDe93f6FV3XXlS+FAgB+79VSx8D6Q/+st8p/R91URtWAHGpM3r9zRl9hols44\nf0o5\r\n=lTD1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgk1TLPmDdozHVxbjADE6v0bD13Wr/yfzkVfNJI/D7pAiEA8DmWig1xTi4plDIBCowkbiLYlT8TYIAYKq4io0q5vwI="}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.0.5_1543589888244_0.8332562499844893"},"_hasShrinkwrap":false},"1.1.0":{"name":"xml-to-json-stream","version":"1.1.0","description":"Simple module to convert XML to JSON with javascript","main":"index.js","repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"scripts":{"test":"jasmine"},"bin":{"tojson":"./bin/tojson.js"},"keywords":["stream","xml to json","xml","json","transform stream","convert"],"author":{"name":"Alexander La Bianca"},"license":"MIT","dependencies":{},"devDependencies":{"jasmine":"^3.0.0"},"gitHead":"e22afdbb60ed44c46b5843d40681224ffec631ad","bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"homepage":"https://github.com/alabianca/xml-to-json#readme","_id":"xml-to-json-stream@1.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"alabianca","email":"labianca.alex@gmail.com"},"dist":{"integrity":"sha512-JaxUCQOk9+KajLNUV51elxlXI8cmN9rX4LVuhdCUtD7Z6N3lBsaD6l6caqjBPB1rieCZXviaoq4OKwAeup4RhA==","shasum":"9dbc56391679f47d7e4370e1019d5251514dece9","tarball":"https://registry.npmjs.org/xml-to-json-stream/-/xml-to-json-stream-1.1.0.tgz","fileCount":11,"unpackedSize":30788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaY2gCRA9TVsSAnZWagAAiowP/1YndYW1yGud8zhnEt+o\nPIhnzXXd1EaO/c4CFD9VMvcU+QRt2uyuvoOCi4fXV6X2rbMeOWm891TyXuHD\nXiCZJU2NHbsONLr37NFnxLW+jNahETi6AH3hmF00RuT4dDLO+Y/eAjHdDKFR\nq6vjMxe59//oy/1NNLbtmw3rUK0STtlgqSr0wBJrWL9RmzOW7WhvSzkjPRWj\ndSCG9UrqIbgYKfpTmbK34BbhXNPlOaPE6GSoQPDzy9CygJB2U6+F7owEJmAw\nrDgmoTMmArV/SNZeNFO2WAdOM79GQTjPVleHDs845wwYwMQkwB1egv3NsDv4\n+GBohOR4ciI1pjOFYiewQNnUSvLKCUs+c9cdCXsXCDen/ykmpukO1k+Q7M4I\nFkvl7ONe6egJ8JjBFTAfIyaPnb77bHIJIDwmec39I535QPKs8VayuJUGUmOJ\nsyms7us35KzZKqjCy9l92G7yNY9T8MM+2iuWrbquEg2n8owkI1rNXhFDGSLU\njEWpGlcIXLtmDjvROwbo5w3CONM5Gg1MDbNg1VLSFeV1A28oPxA5GC0bGBvU\ne2fQTne5IZBvWleUnKcbzC8kbrK/sQ1OAwIMfIT1/G0PwqNYwC8bN08GfZoi\nVEBkwEM9QFyDryxBKrL9CTv1q2C+IlsCrdz9DeOdSSe3F3V/1nbUJNLR5YG3\nupWy\r\n=LYmM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEWzOTf1r4hFSTmboaIQj6274nDdzcnaM5a8rYzftDBQIgPgjX3DCXSCc/+r6FkE1Pe/o1omXJv/MOmZ/muhwdVCg="}]},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-to-json-stream_1.1.0_1550421407887_0.608514901653912"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-02T17:00:37.753Z","1.0.0":"2018-03-02T17:00:37.852Z","modified":"2022-05-25T00:22:32.703Z","1.0.1":"2018-03-02T17:15:49.975Z","1.0.2":"2018-03-07T17:18:05.894Z","1.0.3":"2018-08-09T00:57:04.329Z","1.0.4":"2018-10-03T01:55:15.457Z","1.0.5":"2018-11-30T14:58:08.367Z","1.1.0":"2019-02-17T16:36:48.056Z"},"maintainers":[{"name":"alabianca","email":"labianca.alex@gmail.com"}],"description":"Simple module to convert XML to JSON with javascript","homepage":"https://github.com/alabianca/xml-to-json#readme","keywords":["stream","xml to json","xml","json","transform stream","convert"],"repository":{"type":"git","url":"git+https://github.com/alabianca/xml-to-json.git"},"author":{"name":"Alexander La Bianca"},"bugs":{"url":"https://github.com/alabianca/xml-to-json/issues"},"license":"MIT","readme":"# xml-to-json-stream\n\nSimple module to convert XML to JSON with javascript\n\n## Download\n`npm install xml-to-json-stream` or `npm install xml-to-json-stream -g`\nInstalling the package globally allows you to convert xml file to json files via the command line.\n`cat config.xml | tojson > config.json` . If you want to ignore xml attribute simply add the `-no-attr` flag.\n\n## Public API\n\nxml-to-json-stream only has two public methods `xmlToJson` and `createStream` .\nUse xmlToJson if you simply want to pass in some XML and access the resulting JSON in the callback function. \nUse createStream if you need to pipe some readable XML stream into a writable destination and convert the XML to JSON along the way. \n\nThe module currently accepts `attributeMode` as an option, which defaults to `true ` . `attributeMode` decides whether XML attributes should \nbe ignored or not. \n\n```javascript\nconst xmlToJson = require('xml-to-json-stream');\nconst parser = xmlToJson({attributeMode:false});\n\nconst xml = `\n<employee id=\"123456\">\n    <name>Alex</name>\n</employee>\n`\n\nparser.xmlToJson(xml, (err,json)=>{\n    if(err) {\n        //error handling\n    }\n\n    //json\n    //{\n    //  employee: {\n    //      name: \"Alex\"\n    //  }    \n    //}\n});\n\n//the 'id' attribute of employee is ignored. If attributeMode was set to true or omitted, the json would have been:\n// {\n//   employee: {\n//      id: \"123456\",\n//      name: \"Alex\"\n//   }    \n// }\n\n```\n\n### xmlToJson\n\n```javascript\nconst xmlToJson = require('xml-to-json-stream');\nconst parser = xmlToJson({attributeMode:false});\n\nparser.xmlToJson(xml, (err,json)=>{\n    if(err) {\n        //error handling\n    }\n\n    //json is converted xml\n});\n```\n\n### createStream\n\n`createStream` allows you to create a Node.js Transform stream that can be written to and read from. \nConsider a hypothetical weather service that only responds with XML data. `createStream` will remove some of the boilerplate for you by\nletting you pipe service responses through the parser/stream.\n\n```javascript\nconst xmlToJson = require('xml-to-json-stream');\nconst parser = xmlToJson();\nconst stream = parser.createStream();\n\nconst server = http.createServer((req,res)=>{\n\n    http.get('http://someHypothecialXMLWeatherService/api', (response)=>{ //since response is a readable stream we can pipe it through our stream\n        response.pipe(stream).pipe(res); //the client will receive the json representation of the XML response\n    })\n})\n```\n\n#### Or...\n...If you have an XML file you want to convert on the fly via the command line `$ cat file.xml | node app`\n\n```javascript\nconst xmlToJson = require('xml-to-json-stream');\nconst fs = require('fs');\n\nconst parser = xmlToJson();\nconst stream = parser.createStream();\nconst jsonFile = fs.createWriteStream('jsonFile.json')\n\nprocess.stdin.pipe(stream).pipe(jsonFile);\n```\n\n\n#### Additional Considerations\n\n  * Comments are removed\n  * Root elements are removed\n  * If an element occurs multiple times in the same depth then that element will be represented as an array in the JSON\n    ```\n        <xml>\n            <employee id=\"123\" name=\"alex\"></employee>\n            <employee id=\"456\" name=\"jon\"></employee>\n            <employee id=\"789\" name=\"ashley\"></employee>\n        </xml>\n\n        will turn into...\n\n        {\n            xml: {\n                employee: [\n                    {\n                        id: \"123\",\n                        name: \"alex\"\n                    },\n                    {\n                        id: \"456\",\n                        name: \"jon\"\n                    },\n                    {\n                        id: \"789\",\n                        name: \"ashley\"\n                    }\n                ]\n            }\n        }\n    ```\n    * If an element contains a textNode and attributes the textNode will have the key textNode\n    ```\n        <employee id=\"98765\">Alex</employee>\n        \n        will turn into...\n        \n        employee: {\n            id: \"98765\",\n            textNode: \"Alex\"\n        }\n\n        and ...\n\n        <employee>Alex</employee>\n        \n        will turn into...\n\n        employee: \"Alex\"\n    ```\n\n\n\n    License: MIT\n\n","readmeFilename":"README.md"}