{"id":13515421,"url":"https://github.com/ricardofbarros/parser-xml2json","last_synced_at":"2025-08-14T12:13:04.188Z","repository":{"id":57319690,"uuid":"82982564","full_name":"ricardofbarros/parser-xml2json","owner":"ricardofbarros","description":":fire: Blazing fast XML parser to JSON for Node.js written in Rust :fire:","archived":false,"fork":false,"pushed_at":"2017-07-31T14:47:03.000Z","size":7,"stargazers_count":28,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T12:59:34.624Z","etag":null,"topics":["json","xml","xml-parser","xml2js","xml2json"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ricardofbarros.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-23T23:47:45.000Z","updated_at":"2023-03-15T17:09:58.000Z","dependencies_parsed_at":"2022-08-25T20:40:14.974Z","dependency_job_id":null,"html_url":"https://github.com/ricardofbarros/parser-xml2json","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ricardofbarros/parser-xml2json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofbarros%2Fparser-xml2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofbarros%2Fparser-xml2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofbarros%2Fparser-xml2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofbarros%2Fparser-xml2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardofbarros","download_url":"https://codeload.github.com/ricardofbarros/parser-xml2json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofbarros%2Fparser-xml2json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270416639,"owners_count":24579823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","xml","xml-parser","xml2js","xml2json"],"created_at":"2024-08-01T05:01:11.116Z","updated_at":"2025-08-14T12:13:04.149Z","avatar_url":"https://github.com/ricardofbarros.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Parser XML 2 JSON\n\nBlazing fast XML parser to JSON written in Rust ([node2object](https://github.com/vorot93/node2object)).\n\n## Requirements\n\n- `rust`\n- `cargo`\n- [`node-gyp requirements`](https://github.com/nodejs/node-gyp#installation)\n\n## Usage\n\n```js\nconst parser = require('parser-xml2json')\n\nconst xml = `\n  \u003cpopulation\u003e\n    \u003centry\u003e\n      \u003cname\u003eAlex\u003c/name\u003e\n      \u003cheight\u003e173.5\u003c/height\u003e\n    \u003c/entry\u003e\n    \u003centry\u003e\n      \u003cname\u003eMel\u003c/name\u003e\n      \u003cheight\u003e180.4\u003c/height\u003e\n    \u003c/entry\u003e\n  \u003c/population\u003e\n`\n\nparser.parseString(xml, (err, res) =\u003e {\n   ...\n})\n\nparser.parseFile('/a/xml/file/somewhere.xml', { object: true }, (err, res) =\u003e {\n  ...\n})\n\n```\n\n## API\n\n### `parseString(xmlString[, options], callback)`\n - `xmlString` - A string that represents an XML\n - `options` - an optional object where:\n   - `object` - Parse JSON string to Object. default `false`\n - `callback` - a function with the signature `function (err, result)`\n\n### `parseFile(filePath[, options], callback)`\n- `filePath` - Relative or absolute path to an `.xml` file\n- `options` - an optional object where:\n  - `object` - Parse JSON string to Object. default `false`\n- `callback` - a function with the signature `function (err, result)`\n\n\n## Benchmark\nResults from a i7 2.2 Ghz\n\n```\nPackage                 Time taken\n----------------------  ----------\nparser-xml2json (rust)  0.0468 s\nxml2js (js)             0.1286 s\nxml2json (js and c++)   0.1329 s\n```\n\n### How to run the benchmark script on your machine\n\n```\nnpm i\nnpm i benchmark/\nnode benchmark/index.js\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardofbarros%2Fparser-xml2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardofbarros%2Fparser-xml2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardofbarros%2Fparser-xml2json/lists"}