parse-xml

1.0.1 • Public • Published

parse-xml

XML parser that uses DOMParser, for use in the browser.

Example

window.parseXml(`
<foo>
    <bar>
        AAA
    </bar>
    <bar>
        BBB
    </bar>
</foo>
`)
// => {
//   "foo": {
//     "bar": [
//       {
//         "#text": "AAA"
//       },
//       {
//         "#text": "BBB"
//       }
//     ]
//   }
// }

Readme

Keywords

none

Package Sidebar

Install

npm i parse-xml

Weekly Downloads

20

Version

1.0.1

License

MIT

Last publish

Collaborators

  • omarchehab98