{"id":18029139,"url":"https://github.com/leejim/wxml-parser","last_synced_at":"2025-06-16T06:05:52.586Z","repository":{"id":42945233,"uuid":"233384876","full_name":"LeeJim/wxml-parser","owner":"LeeJim","description":"微信小程序WXML Parser","archived":false,"fork":false,"pushed_at":"2023-03-04T05:40:53.000Z","size":508,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T18:16:48.095Z","etag":null,"topics":["miniprogram","parser","wxml"],"latest_commit_sha":null,"homepage":"","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/LeeJim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-12T11:55:25.000Z","updated_at":"2024-05-28T06:37:58.000Z","dependencies_parsed_at":"2024-06-18T22:46:11.885Z","dependency_job_id":"a5c5f3f7-3849-496c-802e-c79d93cf6af2","html_url":"https://github.com/LeeJim/wxml-parser","commit_stats":{"total_commits":39,"total_committers":4,"mean_commits":9.75,"dds":0.5641025641025641,"last_synced_commit":"67804b1bbd8c33f94048d8968dc2a52fc644df9f"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/LeeJim/wxml-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeJim%2Fwxml-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeJim%2Fwxml-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeJim%2Fwxml-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeJim%2Fwxml-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeeJim","download_url":"https://codeload.github.com/LeeJim/wxml-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeJim%2Fwxml-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260109484,"owners_count":22960030,"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":["miniprogram","parser","wxml"],"created_at":"2024-10-30T09:08:18.961Z","updated_at":"2025-06-16T06:05:52.563Z","avatar_url":"https://github.com/LeeJim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"512\" src=\"https://user-images.githubusercontent.com/7017290/148170109-70f1b3e4-1bd6-41f4-b1e7-c5e11dae3656.png\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@leejim/wxml-parser\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@leejim/wxml-parser\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@leejim/wxml-parser\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dw/@leejim/wxml-parser\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@leejim/wxml-parser\"\u003e\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/@leejim/wxml-parser\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## wxml-parser\n\n微信小程序 WXML Parser\n\n## 安装\n\n```bash\nnpm install -D @leejim/wxml-parser\n```\n\n## 使用\n\n```js\nvar WXMLParser = require('@leejim/wxml-parser');\nvar parser = new WXMLParser({\n    onopentag(tagname, attrs, isSelfClosing) {},\n\n    onclosetag(tagname) {},\n\n    ontext(text) {},\n\n    oncomment(cmt) {},\n\n    ontemplate(tmp) {}\n});\nparser.write('\u003cview\u003etest\u003c/view\u003e');\n```\n\n## 参数\n\n### onopentag\n\n参数名|数据类型|描述\n--|--|--\ntagname | `string` | 标签名\nattrs | `Array\u003cstring|AttrEntity\u003e; interface AttrEntity { key: string; value: string } ` | 单值时只返回 `key`；否则返回 `key`` 和 `value`\nisSelfClosing | `boolean` | 是否自闭合标签","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleejim%2Fwxml-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleejim%2Fwxml-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleejim%2Fwxml-parser/lists"}