{"id":16493850,"url":"https://github.com/echosoar/dolmx","last_synced_at":"2025-09-25T19:46:32.176Z","repository":{"id":57214594,"uuid":"148625594","full_name":"echosoar/dolmx","owner":"echosoar","description":"A no dependence xml parser written in javaScript, only 1kb! Run in node or browser.史上最精简XML解析器，只有1KB，无任何依赖，可运行于Node.js或浏览器环境！","archived":false,"fork":false,"pushed_at":"2024-09-19T15:38:30.000Z","size":152,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T22:42:51.882Z","etag":null,"topics":["1kb","fastxml","javascript-library","nodejs","nodejs-xml","nodependence","parser","xml","xml-parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/echosoar.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":"2018-09-13T11:05:21.000Z","updated_at":"2024-09-19T15:38:31.000Z","dependencies_parsed_at":"2022-08-26T13:41:24.564Z","dependency_job_id":null,"html_url":"https://github.com/echosoar/dolmx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fdolmx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fdolmx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fdolmx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fdolmx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echosoar","download_url":"https://codeload.github.com/echosoar/dolmx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244758182,"owners_count":20505602,"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","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":["1kb","fastxml","javascript-library","nodejs","nodejs-xml","nodependence","parser","xml","xml-parser"],"created_at":"2024-10-11T14:10:55.652Z","updated_at":"2025-09-25T19:46:32.068Z","avatar_url":"https://github.com/echosoar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Dolmx is a **1kb** [XML] parser.\n\nIt's designed to be as minimal as possible, no devDependencies, run in browser or node.\n\u003cp \u003e\n  \u003ca href=\"https://www.npmjs.com/package/dolmx\" alt=\"npm version\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/dolmx.svg?style=flat\" /\u003e\n  \u003c/a\u003e\n  \u003ca alt=\"GitHub license\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/echosoar/dolmx/actions?query=workflow%3A%22Node.js+CI%22\" alt=\"Node.js CI\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Node.js%20CI-passing-brightgreen\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n- **Fast:** O(n)\n- **Tiny:** It's 1kb.\n- **Robust:** Written in Typescript, Passed a lot of unit tests.\n- **Simple:** Pass a XML string, get back an javscript Object.\n\n\n## Usage\n\n```\nnpm i dolmx --save\n```\n\nDolmx exports a single function, which parses a string of XML and returns a javscript Object. Couldn't be simpler.\n\n\n```js\nimport dolmx from 'dolmx';\n\nlet xml = `\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003crss version=\"2.0\"\u003e\n  \u003cchannel\u003e\n    \u003ctitle\u003e\u003c![CDATA[知乎热榜]]\u003e\u003c/title\u003e\n    \u003clink\u003ehttps://www.zhihu.com/billboard\u003c/link\u003e\n    \u003cdescription\u003e\u003c![CDATA[知乎热榜]]\u003e\u003c/description\u003e\n    \u003cgenerator\u003eFeedIamGy\u003c/generator\u003e\n    \u003cwebMaster\u003efeed.iam.gy\u003c/webMaster\u003e\n    \u003clanguage\u003ezh-cn\u003c/language\u003e\n    \u003clastBuildDate\u003eThu Sep 13 2018 10:42:34 GMT+0800 (CST)\u003c/lastBuildDate\u003e\n    \u003cttl\u003e3000\u003c/ttl\u003e\n    \u003citem\u003e\n      \u003ctitle\u003e\u003c![CDATA[苹果公司 2018 年 9 月 12 日举办的秋季发布会有哪些亮点和槽点？]]\u003e\u003c/title\u003e\n      \u003cdescription\u003e\n      \u003c![CDATA[在过去的 10 年里，iOS 一点点成长为了苹果最重要的现金牛]]\u003e\u003c/description\u003e\n      \u003cpubDate\u003eThu, 13 Sep 2018 02:42:32 GMT\u003c/pubDate\u003e\n      \u003cguid\u003ehttps://www.zhihu.com/question/294345168\u003c/guid\u003e\n      \u003clink\u003ehttps://www.zhihu.com/question/294345168\u003c/link\u003e\n    \u003c/item\u003e\n  \u003c/channel\u003e\n\u003c/rss\u003e\n`;\n\nlet obj = Dolmx(data);\nconsole.log(JSON.stringify(obj, null, '\\t'));\n/*\n{\n  \"xml\": {\n    \"_attr\": {\n      \"version\": \"1.0\",\n      \"encoding\": \"UTF-8\"\n    }\n  },\n  \"rss\": {\n    \"channel\": {\n      \"title\": {\n        \"_value\": \"知乎热榜\"\n      },\n      \"link\": {\n        \"_value\": \"https://www.zhihu.com/billboard\"\n      },\n      \"description\": {\n        \"_value\": \"知乎热榜\"\n      },\n      \"generator\": {\n        \"_value\": \"FeedIamGy\"\n      },\n      \"webMaster\": {\n        \"_value\": \"feed.iam.gy\"\n      },\n      \"language\": {\n        \"_value\": \"zh-cn\"\n      },\n      \"lastBuildDate\": {\n        \"_value\": \"Thu Sep 13 2018 10:42:34 GMT+0800 (CST)\"\n      },\n      \"ttl\": {\n        \"_value\": \"3000\"\n      },\n      \"item\": {\n        \"title\": {\n          \"_value\": \"苹果公司 2018 年 9 月 12 日举办的秋季发布会有哪些亮点和槽点？\"\n        },\n        \"description\": {\n          \"_value\": \"在过去的 10 年里，iOS 一点点成长为了苹果最重要的现金牛\"\n        },\n        \"pubDate\": {\n          \"_value\": \"Thu, 13 Sep 2018 02:42:32 GMT\"\n        },\n        \"guid\": {\n          \"_value\": \"https://www.zhihu.com/question/294345168\"\n        },\n        \"link\": {\n          \"_value\": \"https://www.zhihu.com/question/294345168\"\n        }\n      }\n    },\n    \"_attr\": {\n      \"version\": \"2.0\"\n    }\n  }\n}\n*/\n\n```\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechosoar%2Fdolmx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechosoar%2Fdolmx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechosoar%2Fdolmx/lists"}