{"id":16994618,"url":"https://github.com/znerol/node-xmlshim","last_synced_at":"2025-04-12T05:25:05.462Z","repository":{"id":1991455,"uuid":"2924023","full_name":"znerol/node-xmlshim","owner":"znerol","description":"DOMWriter and XMLParser for node.js","archived":false,"fork":false,"pushed_at":"2020-03-03T19:57:17.000Z","size":151,"stargazers_count":11,"open_issues_count":3,"forks_count":18,"subscribers_count":2,"default_branch":"2.x","last_synced_at":"2025-02-16T12:58:08.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/znerol.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-06T10:39:53.000Z","updated_at":"2022-01-08T09:50:38.000Z","dependencies_parsed_at":"2022-09-15T18:41:52.463Z","dependency_job_id":null,"html_url":"https://github.com/znerol/node-xmlshim","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fnode-xmlshim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fnode-xmlshim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fnode-xmlshim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fnode-xmlshim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znerol","download_url":"https://codeload.github.com/znerol/node-xmlshim/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239889001,"owners_count":19713702,"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":[],"created_at":"2024-10-14T03:46:04.985Z","updated_at":"2025-02-20T21:31:30.590Z","avatar_url":"https://github.com/znerol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Node XML Shim\n=============\n\n[![Build Status](https://secure.travis-ci.org/znerol/node-xmlshim.svg?branch=2.x)](http://travis-ci.org/znerol/node-xmlshim)\n\nThis project brings the ``DOMParser``[1] and ``XMLSerializer``[2] objects known\nfrom the browser to node.js. Additionally functions from\n``document.implementation``, most importantly ``createDocument``[3] are exposed\nvia this module.\n\nXML Shim is ready to be browsified and therefore pretty useful for\ncross-platform projects.\n\nBranches:\n--------\n\n* *0.x*: Compatible with node versions supported by jsdom 0.11.x\n* *1.x*: Compatible with node versions supported by jsdom 3.x (0.10, 0.12)\n* *2.x*: Compatible with node versions supported by jsdom \u003e= 3.x (4, 6, 8)\n\nNote that jsdom \u003e= 1.0 does not support CDATA sections. Hence xmlshim \u003e= 1.x\nwill fail to parse/write any CDATA sections.\n\n\nDOMParser example:\n------------------\n\n    var xmlshim = require('xmlshim');\n    var dp = new xmlshim.DOMParser();\n    var doc = dp.parseFromString('\u003chello-world/\u003e', 'text/xml');\n    console.log(doc.firstChild.nodeName);\n\n\nXMLSerializer example:\n----------------------\n\n    var xmlshim = require('xmlshim');\n    var xs = new xmlshim.XMLSerializer();\n    var doc = xmlshim.implementation.createDocument('', '', null);\n    var root = doc.createElement('hello-world');\n    doc.appendChild(root);\n    console.log(xs.serializeToString(doc));\n\n\nRun the test suite:\n-------------------\n\nRun the test suite under node.js:\n    \n    make test\n\nRun the test suite in firefox web browser (adapt the Makefile or point your\nbrowser manually at browser-test/test.html if you want to test in another\nbrowser):\n\n    make browser-test\n\n\nDependencies:\n-------------\n\nXML Shim depends on jsdom[4] for the DOM bits as well as a on the\nxmlwriter-branch[5] of libxmljs[6] for serialization and parsing. Browserify[7]\nand nodeunit is required in order to build and run the browser test suite.\n\n\n[1]: https://developer.mozilla.org/En/DOMParser\n[2]: https://developer.mozilla.org/En/XMLSerializer\n[3]: https://developer.mozilla.org/En/DOM/DOMImplementation.createDocument\n[4]: https://github.com/tmpvar/jsdom\n[5]: https://github.com/znerol/libxmljs/tree/xmlwriter-0.4.2\n[6]: https://github.com/polotek/libxmljs\n[7]: https://github.com/substack/node-browserify\n[8]: https://github.com/caolan/nodeunit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznerol%2Fnode-xmlshim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznerol%2Fnode-xmlshim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznerol%2Fnode-xmlshim/lists"}