{"_id":"xml-parse-from-string","_rev":"324323","name":"xml-parse-from-string","description":"DOMParser.parseFromString for XML with IE8 fallback","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2021-06-04T01:55:35.000Z","created":"2015-03-13T18:58:00.158Z","1.0.1":"2017-05-18T13:45:24.646Z","1.0.0":"2015-03-13T18:58:00.158Z"},"users":{"mojaray2k":true,"daffyfeng":true},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"repository":{"type":"git","url":"git://github.com/Jam3/xml-parse-from-string.git"},"versions":{"1.0.1":{"name":"xml-parse-from-string","version":"1.0.1","description":"DOMParser.parseFromString for XML with IE8 fallback","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"brfs":"^1.4.0","browserify":"^9.0.3","faucet":"0.0.1","tape":"^3.5.0","testling":"^1.7.1"},"scripts":{"test":"browserify test.js -t brfs | testling | faucet"},"keywords":["ie8","fallback","dom","parser","DOMParser","xml","string","parse","browser","browserify","webpack","activeXObject"],"repository":{"type":"git","url":"git://github.com/Jam3/xml-parse-from-string.git"},"homepage":"https://github.com/Jam3/xml-parse-from-string","bugs":{"url":"https://github.com/Jam3/xml-parse-from-string/issues"},"gitHead":"d23f70309e3959cef64803c666e24ba1c451d6c3","_id":"xml-parse-from-string@1.0.1","_shasum":"a9029e929d3dbcded169f3c6e28238d95a5d5a28","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"a9029e929d3dbcded169f3c6e28238d95a5d5a28","size":2094,"noattachment":false,"key":"/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/xml-parse-from-string/download/xml-parse-from-string-1.0.1.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xml-parse-from-string-1.0.1.tgz_1495115124388_0.20413493970409036"},"directories":{},"publish_time":1495115124646,"_cnpm_publish_time":1495115124646,"_hasShrinkwrap":false},"1.0.0":{"name":"xml-parse-from-string","version":"1.0.0","description":"DOMParser.parseFromString for XML with IE8 fallback","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"brfs":"^1.4.0","browserify":"^9.0.3","faucet":"0.0.1","tape":"^3.5.0","testling":"^1.7.1"},"scripts":{"test":"browserify test.js -t brfs | testling | faucet"},"keywords":["ie8","fallback","dom","parser","DOMParser","xml","string","parse","browser","browserify","webpack","activeXObject"],"repository":{"type":"git","url":"git://github.com/Jam3/xml-parse-from-string.git"},"homepage":"https://github.com/Jam3/xml-parse-from-string","bugs":{"url":"https://github.com/Jam3/xml-parse-from-string/issues"},"gitHead":"ccd1cf8405f3591724128abdaaf3a2e1c82dc751","_id":"xml-parse-from-string@1.0.0","_shasum":"feba5809f3cd2d17d2e4239fa810cd0319fc5da5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"dist":{"shasum":"feba5809f3cd2d17d2e4239fa810cd0319fc5da5","size":1440,"noattachment":false,"key":"/xml-parse-from-string/-/xml-parse-from-string-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xml-parse-from-string/download/xml-parse-from-string-1.0.0.tgz"},"directories":{},"publish_time":1426273080158,"_cnpm_publish_time":1426273080158,"_hasShrinkwrap":false}},"readme":"# xml-parse-from-string\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nA light browser wrapper around `DOMParser.parseFromString` for XML, with fallback for IE8 and other browsers.\n\n- attempts to use DOMParser with `\"application/xml\"`\n- falls back to `ActiveXObject('Microsoft.XMLDOM')`\n- then falls back to `createElement` / `innerHTML`  \n\n```js\nvar parseXML = require('xml-parse-from-string')\n\nvar str = '<root><foobar id=\"blah\"></foobar></root>'\nvar doc = parseXML(str)\nvar tag = doc.getElementsByTagName('foobar')[0]\n\nconsole.log(tag.getAttribute('id')) // -> \"blah\"\n```\n\nBe wary of subtle differences between implementations, such as case-sensitivity in `attribute.nodeName`.\n\nPRs for Node version welcome.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/xml-parse-from-string.png)](https://www.npmjs.com/package/xml-parse-from-string)\n\n#### `root = parse(str)`\n\nParses the string as XML and returns the `root` element as a DOM element, so you can do operations similar to `document.getElementById`, `document.getElementsByTagName`, and so forth.\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/Jam3/xml-parse-from-string/blob/master/LICENSE.md) for details.\n","_attachments":{},"homepage":"https://github.com/Jam3/xml-parse-from-string","bugs":{"url":"https://github.com/Jam3/xml-parse-from-string/issues"},"license":"MIT"}