{"_id":"xmldom-sre","_rev":"3549655","name":"xmldom-sre","description":"A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.","dist-tags":{"latest":"0.9.0-beta.7"},"maintainers":[{"name":"zorkow","email":""}],"time":{"modified":"2024-09-19T02:39:48.000Z","created":"2018-01-26T16:17:30.515Z","0.9.0-beta.7":"2023-05-18T15:32:20.017Z","0.9.0-beta.6":"2023-03-30T09:58:48.146Z","0.1.31":"2018-02-07T18:23:20.955Z","0.1.31-beta.0":"2018-02-07T13:51:32.175Z","0.1.30":"2018-02-04T12:58:26.544Z","0.1.30-beta.0":"2018-01-26T16:17:30.515Z"},"users":{},"repository":{"type":"git","url":"git://github.com/xmldom/xmldom.git"},"versions":{"0.9.0-beta.7":{"name":"xmldom-sre","version":"0.9.0-beta.7","description":"A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer","ponyfill"],"homepage":"https://github.com/xmldom/xmldom","repository":{"type":"git","url":"git://github.com/xmldom/xmldom.git"},"main":"lib/index.js","types":"index.d.ts","scripts":{"lint":"eslint examples lib test","format":"prettier --write examples lib test","changelog":"auto-changelog --unreleased-only","start":"nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test && npm --silent run lint'","stryker":"stryker run","stryker:dry-run":"stryker run -m '' --reporters progress","test":"jest","testrelease":"npm test && eslint lib","version":"./changelog-has-version.sh","release":"np --no-yarn --test-script testrelease"},"engines":{"node":">=10.0.0"},"dependencies":{},"devDependencies":{"@stryker-mutator/core":"5.6.1","auto-changelog":"2.4.0","eslint":"8.40.0","eslint-config-prettier":"8.8.0","eslint-plugin-anti-trojan-source":"1.1.1","eslint-plugin-es5":"1.5.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"4.2.1","get-stream":"6.0.1","jest":"27.5.1","nodemon":"2.0.22","np":"7.7.0","prettier":"2.8.8","xmltest":"1.5.0","yauzl":"2.10.0"},"bugs":{"url":"https://github.com/xmldom/xmldom/issues"},"license":"MIT","auto-changelog":{"prepend":true,"remote":"upstream","tagPrefix":"","template":"./auto-changelog.hbs"},"gitHead":"d7162bb773dbb951c5472d51c0e90dc3c4f11d44","_id":"xmldom-sre@0.9.0-beta.7","_nodeVersion":"20.1.0","_npmVersion":"9.6.4","dist":{"shasum":"94f4d89123fdb33e34f0ed7146597502cf12955c","size":58676,"noattachment":false,"key":"/xmldom-sre/-/xmldom-sre-0.9.0-beta.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/xmldom-sre/download/xmldom-sre-0.9.0-beta.7.tgz"},"_npmUser":{"name":"zorkow","email":"Volker.Sorge@gmail.com"},"directories":{},"maintainers":[{"name":"zorkow","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom-sre_0.9.0-beta.7_1684423939853_0.04724393174736563"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-18T15:32:20.017Z","publish_time":1684423940017,"_source_registry_name":"default","_cnpm_publish_time":1684423940017},"0.9.0-beta.6":{"name":"xmldom-sre","version":"0.9.0-beta.6","description":"A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer","ponyfill"],"homepage":"https://github.com/speech-rule-engine/xmldom","repository":{"type":"git","url":"git://github.com/speech-rule-engine/xmldom.git"},"main":"lib/index.js","types":"index.d.ts","scripts":{"lint":"eslint examples lib test","format":"prettier --write examples lib test","changelog":"auto-changelog --unreleased-only","start":"nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test && npm --silent run lint'","stryker":"stryker run","stryker:dry-run":"stryker run -m '' --reporters progress","test":"jest","testrelease":"npm test && eslint lib","version":"./changelog-has-version.sh","release":"np --no-yarn --test-script testrelease"},"engines":{"node":">=10.0.0"},"dependencies":{},"devDependencies":{"@stryker-mutator/core":"5.6.1","auto-changelog":"2.4.0","eslint":"8.34.0","eslint-config-prettier":"8.6.0","eslint-plugin-anti-trojan-source":"1.1.1","eslint-plugin-es5":"1.5.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"4.2.1","get-stream":"6.0.1","jest":"27.5.1","nodemon":"2.0.20","np":"7.6.2","prettier":"2.8.4","xmltest":"1.5.0","yauzl":"2.10.0"},"bugs":{"url":"https://github.com/speech-rule-engine/xmldom/issues"},"license":"MIT","auto-changelog":{"prepend":true,"remote":"upstream","tagPrefix":"","template":"./auto-changelog.hbs"},"gitHead":"a5de6178d6f5a469c7f8571e685b06aa8b6c166c","_id":"xmldom-sre@0.9.0-beta.6","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"shasum":"b7a27173d6a9d4eacb7d64d36c24c8d17d999e9e","size":58795,"noattachment":false,"key":"/xmldom-sre/-/xmldom-sre-0.9.0-beta.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/xmldom-sre/download/xmldom-sre-0.9.0-beta.6.tgz"},"_npmUser":{"name":"zorkow","email":"Volker.Sorge@gmail.com"},"directories":{},"maintainers":[{"name":"zorkow","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom-sre_0.9.0-beta.6_1680170327997_0.9941287433473063"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-03-30T09:58:48.146Z","publish_time":1680170328146,"_cnpm_publish_time":1680170328146},"0.1.31":{"name":"xmldom-sre","version":"0.1.31","description":"A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],"homepage":"https://github.com/zorkow/xmldom","author":{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},"repository":{"type":"git","url":"git://github.com/zorkow/xmldom.git"},"main":"./dom-parser.js","scripts":{"test":"proof platform win32 && proof test */*/*.t.js || t/test"},"engines":{"node":">=0.1"},"dependencies":{},"devDependencies":{"proof":"0.0.28"},"maintainers":[{"name":"zorkow","email":""}],"contributors":[{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},{"name":"Yaron Naveh","email":"yaronn01@gmail.com","url":"http://webservices20.blogspot.com/"},{"name":"Harutyun Amirjanyan","email":"amirjanyan@gmail.com","url":"https://github.com/nightwing"},{"name":"Alan Gutierrez","email":"alan@prettyrobots.com","url":"http://www.prettyrobots.com/"}],"bugs":{"url":"https://github.com/jindw/xmldom/issues","email":"volker.sorge@gmail.com"},"license":"(LGPL-2.0 or MIT)","gitHead":"49bb6e286f12d21b5a2798c9775f4580d1d559ec","_id":"xmldom-sre@0.1.31","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"zorkow","email":"Volker.Sorge@gmail.com"},"dist":{"shasum":"10860d5bab2c603144597d04bf2c4980e98067f4","size":33574,"noattachment":false,"key":"/xmldom-sre/-/xmldom-sre-0.1.31.tgz","tarball":"http://registry.cnpm.dingdandao.com/xmldom-sre/download/xmldom-sre-0.1.31.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom-sre_0.1.31_1518027800225_0.44956395563091434"},"_hasShrinkwrap":false,"publish_time":1518027800955,"_cnpm_publish_time":1518027800955,"_cnpmcore_publish_time":"2021-12-16T22:01:29.977Z"},"0.1.31-beta.0":{"name":"xmldom-sre","version":"0.1.31-beta.0","description":"A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],"homepage":"https://github.com/zorkow/xmldom","author":{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},"repository":{"type":"git","url":"git://github.com/zorkow/xmldom.git"},"main":"./dom-parser.js","scripts":{"test":"proof platform win32 && proof test */*/*.t.js || t/test"},"engines":{"node":">=0.1"},"dependencies":{},"devDependencies":{"proof":"0.0.28"},"maintainers":[{"name":"zorkow","email":""}],"contributors":[{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},{"name":"Yaron Naveh","email":"yaronn01@gmail.com","url":"http://webservices20.blogspot.com/"},{"name":"Harutyun Amirjanyan","email":"amirjanyan@gmail.com","url":"https://github.com/nightwing"},{"name":"Alan Gutierrez","email":"alan@prettyrobots.com","url":"http://www.prettyrobots.com/"}],"bugs":{"url":"https://github.com/jindw/xmldom/issues","email":"volker.sorge@gmail.com"},"license":"(LGPL-2.0 or MIT)","gitHead":"444b774db012763417cbe640fb58ae5eaf392eb7","_id":"xmldom-sre@0.1.31-beta.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"zorkow","email":"Volker.Sorge@gmail.com"},"dist":{"shasum":"b606e5c8629d7794e9d938846f0c50ad237f3422","size":33579,"noattachment":false,"key":"/xmldom-sre/-/xmldom-sre-0.1.31-beta.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xmldom-sre/download/xmldom-sre-0.1.31-beta.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom-sre_0.1.31-beta.0_1518011491385_0.619637452785256"},"_hasShrinkwrap":false,"publish_time":1518011492175,"_cnpm_publish_time":1518011492175,"_cnpmcore_publish_time":"2021-12-16T22:01:30.956Z"},"0.1.30":{"name":"xmldom-sre","version":"0.1.30","description":"A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],"homepage":"https://github.com/zorkow/xmldom","author":{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},"repository":{"type":"git","url":"git://github.com/zorkow/xmldom.git"},"main":"./dom-parser.js","scripts":{"test":"proof platform win32 && proof test */*/*.t.js || t/test"},"engines":{"node":">=0.1"},"dependencies":{},"devDependencies":{"proof":"0.0.28"},"maintainers":[{"name":"zorkow","email":""}],"contributors":[{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},{"name":"Yaron Naveh","email":"yaronn01@gmail.com","url":"http://webservices20.blogspot.com/"},{"name":"Harutyun Amirjanyan","email":"amirjanyan@gmail.com","url":"https://github.com/nightwing"},{"name":"Alan Gutierrez","email":"alan@prettyrobots.com","url":"http://www.prettyrobots.com/"}],"bugs":{"url":"https://github.com/jindw/xmldom/issues","email":"volker.sorge@gmail.com"},"license":"(LGPL-2.0 or MIT)","gitHead":"6c1012474c7c448538f486f503b0ff2ce4c79388","_id":"xmldom-sre@0.1.30","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"zorkow","email":"Volker.Sorge@gmail.com"},"dist":{"shasum":"a1a682ecd1d21b5dc08937713c31e568ed6a1bde","size":22491,"noattachment":false,"key":"/xmldom-sre/-/xmldom-sre-0.1.30.tgz","tarball":"http://registry.cnpm.dingdandao.com/xmldom-sre/download/xmldom-sre-0.1.30.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom-sre-0.1.30.tgz_1517749105449_0.26531721488572657"},"directories":{},"publish_time":1517749106544,"_hasShrinkwrap":false,"_cnpm_publish_time":1517749106544,"_cnpmcore_publish_time":"2021-12-16T22:01:31.199Z"},"0.1.30-beta.0":{"name":"xmldom-sre","version":"0.1.30-beta.0","description":"A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],"homepage":"https://github.com/zorkow/xmldom","author":{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},"repository":{"type":"git","url":"git://github.com/zorkow/xmldom.git"},"main":"./dom-parser.js","scripts":{"test":"proof platform win32 && proof test */*/*.t.js || t/test"},"engines":{"node":">=0.1"},"dependencies":{},"devDependencies":{"proof":"0.0.28"},"maintainers":[{"name":"zorkow","email":""}],"contributors":[{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},{"name":"Yaron Naveh","email":"yaronn01@gmail.com","url":"http://webservices20.blogspot.com/"},{"name":"Harutyun Amirjanyan","email":"amirjanyan@gmail.com","url":"https://github.com/nightwing"},{"name":"Alan Gutierrez","email":"alan@prettyrobots.com","url":"http://www.prettyrobots.com/"}],"bugs":{"url":"https://github.com/zorkow/speech-rule-engine/issues","email":"volker.sorge@gmail.com"},"license":"(LGPL-2.0 or MIT)","gitHead":"f1171d44f41c12e0b9b64161f614d31b960f6071","_id":"xmldom-sre@0.1.30-beta.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"zorkow","email":"Volker.Sorge@gmail.com"},"dist":{"shasum":"53340d2624360eede6ef0da03a0f9713bbaba122","size":22505,"noattachment":false,"key":"/xmldom-sre/-/xmldom-sre-0.1.30-beta.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xmldom-sre/download/xmldom-sre-0.1.30-beta.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom-sre-0.1.30-beta.0.tgz_1516983449357_0.5513885410036892"},"directories":{},"publish_time":1516983450515,"_hasShrinkwrap":false,"_cnpm_publish_time":1516983450515,"_cnpmcore_publish_time":"2021-12-16T22:01:31.393Z"}},"readme":"# @xmldom/xmldom\n\n***Since version 0.7.0 this package is published to npm as [`@xmldom/xmldom`](https://www.npmjs.com/package/@xmldom/xmldom) and no longer as [`xmldom`](https://www.npmjs.com/package/xmldom), because [we are no longer able to publish `xmldom`](https://github.com/xmldom/xmldom/issues/271).***  \n*For better readability in the docs we will continue to talk about this library as \"xmldom\".*\n\n[![license(MIT)](https://img.shields.io/npm/l/@xmldom/xmldom?color=blue&style=flat-square)](https://github.com/xmldom/xmldom/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/@xmldom/xmldom?style=flat-square)](https://www.npmjs.com/package/@xmldom/xmldom)\n[![snyk.io package health](https://snyk.io/advisor/npm-package/@xmldom/xmldom/badge.svg)](https://snyk.io/advisor/npm-package/@xmldom/xmldom)\n[![bug issues](https://img.shields.io/github/issues/xmldom/xmldom/bug?color=red&style=flat-square)](https://github.com/xmldom/xmldom/issues?q=is%3Aissue+is%3Aopen+label%3Abug)\n[![help-wanted issues](https://img.shields.io/github/issues/xmldom/xmldom/help-wanted?color=darkgreen&style=flat-square)](https://github.com/xmldom/xmldom/issues?q=is%3Aissue+is%3Aopen+label%3Ahelp-wanted)\n[![Mutation report](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fxmldom%2Fxmldom%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/xmldom/xmldom/master)\n\n\nxmldom is a javascript [ponyfill](https://ponyfill.com/) to provide the following APIs [that are present in modern browsers](https://caniuse.com/xml-serializer) to other runtimes:\n- convert an XML string into a DOM tree\n  ```\n  new DOMParser().parseFromString(xml, mimeType) => Document\n  ```\n- create, access and modify a DOM tree\n  ```\n  new DOMImplementation().createDocument(...) => Document\n  ```\n- serialize a DOM tree back into an XML string\n  ```\n  new XMLSerializer().serializeToString(node) => string\n  ```\n\nThe target runtimes `xmldom` supports are currently Node >= v10 (ES5) and Rhino ([not tested as part of CI](https://github.com/xmldom/xmldom/discussions/214)).\n\nWhen deciding how to fix bugs or implement features, `xmldom` tries to stay as close  as possible to the various [related specifications/standards](#specs).  \nAs indicated by the version starting with `0.`, this implementation is not feature complete and some implemented features differ from what the specifications describe.  \n**Issues and PRs for such differences are always welcome, even when they only provide a failing test case.**\n\nThis project was forked from it's [original source](https://github.com/jindw/xmldom) in 2019, more details about that transition can be found in the [CHANGELOG](CHANGELOG.md#maintainer-changes).\n\n## Usage\n\n### Install:\n\n> npm install @xmldom/xmldom\n\n### Example:\n\n[In NodeJS](examples/nodejs/src/index.js)\n```javascript\nconst { DOMParser, XMLSerializer } = require('@xmldom/xmldom')\n\nconst source = `<xml xmlns=\"a\">\n\t<child>test</child>\n\t<child/>\n</xml>`\n\nconst doc = new DOMParser().parseFromString(source, 'text/xml')\n\nconst serialized = new XMLSerializer().serializeToString(doc)\n```\n\nNote: in Typescript ~and ES6~(see #316) you can use the `import` approach, as follows:\n\n```typescript\nimport { DOMParser } from '@xmldom/xmldom'\n```\n\n## API Reference\n\n * [DOMParser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser):\n\n\t```javascript\n\tparseFromString(xmlsource,mimeType)\n\t```\n\t* **options extension** _by xmldom_ (not DOM standard!!)\n\n\t```javascript\n\t//added the options argument\n\tnew DOMParser(options)\n\t\n\t//errorHandler is supported\n\tnew DOMParser({\n\t\t/**\n\t\t * locator is always need for error position info\n\t\t */\n\t\tlocator:{},\n\t\t/**\n\t\t * you can override the errorHandler for xml parser\n\t\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t\t */\n\t\terrorHandler:{warning:function(w){console.warn(w)},error:callback,fatalError:callback}\n\t\t//only callback model\n\t\t//errorHandler:function(level,msg){console.log(level,msg)}\n\t})\n\t\t\n\t```\n\n * [XMLSerializer](https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer)\n \n\t```javascript\n\tserializeToString(node)\n\t```\n### DOM level2 method and attribute:\n\n* [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)\n\n  readonly class properties (aka `NodeType`),  \n  these can be accessed from any `Node` instance `node`:  \n  `if (node.nodeType === node.ELEMENT_NODE) {...`\n  \n    1. `ELEMENT_NODE` (`1`)\n    2. `ATTRIBUTE_NODE` (`2`)\n    3. `TEXT_NODE` (`3`)\n    4. `CDATA_SECTION_NODE` (`4`)\n    5. `ENTITY_REFERENCE_NODE` (`5`)\n    6. `ENTITY_NODE` (`6`)\n    7. `PROCESSING_INSTRUCTION_NODE` (`7`)\n    8. `COMMENT_NODE` (`8`)\n    9. `DOCUMENT_NODE` (`9`)\n    10. `DOCUMENT_TYPE_NODE` (`10`)\n    11. `DOCUMENT_FRAGMENT_NODE` (`11`)\n    12. `NOTATION_NODE` (`12`)\n  \n  attribute:\n    - `nodeValue` | `prefix`\n  \n  readonly attribute:\n    - `nodeName` | `nodeType` | `parentNode` | `childNodes` | `firstChild` | `lastChild` | `previousSibling` | `nextSibling` | `attributes` | `ownerDocument` | `namespaceURI` | `localName`\n  \n  method:\t\n    * `insertBefore(newChild, refChild)`\n    * `replaceChild(newChild, oldChild)`\n    * `removeChild(oldChild)`\n    * `appendChild(newChild)`\n    * `hasChildNodes()`\n    * `cloneNode(deep)`\n    * `normalize()`\n    * `isSupported(feature, version)`\n    * `hasAttributes()`\n* [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)\n\n  extends the Error type thrown as part of DOM API.\n\n  readonly class properties:\n  - `INDEX_SIZE_ERR` (`1`)\n  - `DOMSTRING_SIZE_ERR` (`2`)\n  - `HIERARCHY_REQUEST_ERR` (`3`)\n  - `WRONG_DOCUMENT_ERR` (`4`)\n  - `INVALID_CHARACTER_ERR` (`5`)\n  - `NO_DATA_ALLOWED_ERR` (`6`)\n  - `NO_MODIFICATION_ALLOWED_ERR` (`7`)\n  - `NOT_FOUND_ERR` (`8`)\n  - `NOT_SUPPORTED_ERR` (`9`)\n  - `INUSE_ATTRIBUTE_ERR` (`10`)\n  - `INVALID_STATE_ERR` (`11`)\n  - `SYNTAX_ERR` (`12`)\n  - `INVALID_MODIFICATION_ERR` (`13`)\n  - `NAMESPACE_ERR` (`14`)\n  - `INVALID_ACCESS_ERR` (`15`)\n   \n  attributes:\n  -  `code` with a value matching one of the above constants.\n\n* [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)\n\n  method:\n  - `hasFeature(feature, version)`\n  - `createDocumentType(qualifiedName, publicId, systemId)`\n  - `createDocument(namespaceURI, qualifiedName, doctype)`\n\n* [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node\n\t\t\n  readonly attribute:\n  - `doctype` | `implementation` | `documentElement`\n  \n  method:\n  - `createElement(tagName)`\n  - `createDocumentFragment()`\n  - `createTextNode(data)`\n  - `createComment(data)`\n  - `createCDATASection(data)`\n  - `createProcessingInstruction(target, data)`\n  - `createAttribute(name)`\n  - `createEntityReference(name)`\n  - `getElementsByTagName(tagname)`\n  - `importNode(importedNode, deep)`\n  - `createElementNS(namespaceURI, qualifiedName)`\n  - `createAttributeNS(namespaceURI, qualifiedName)`\n  - `getElementsByTagNameNS(namespaceURI, localName)`\n  - `getElementById(elementId)`\n\n* [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node\n* [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node\n\t\t\n  readonly attribute:\n  - `tagName`\n\n  method:\n  - `getAttribute(name)`\n  - `setAttribute(name, value)`\n  - `removeAttribute(name)`\n  - `getAttributeNode(name)`\n  - `setAttributeNode(newAttr)`\n  - `removeAttributeNode(oldAttr)`\n  - `getElementsByTagName(name)`\n  - `getAttributeNS(namespaceURI, localName)`\n  - `setAttributeNS(namespaceURI, qualifiedName, value)`\n  - `removeAttributeNS(namespaceURI, localName)`\n  - `getAttributeNodeNS(namespaceURI, localName)`\n  - `setAttributeNodeNS(newAttr)`\n  - `getElementsByTagNameNS(namespaceURI, localName)`\n  - `hasAttribute(name)`\n  - `hasAttributeNS(namespaceURI, localName)`\n\n* [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node\n\n  attribute:\n  - `value`\n\n  readonly attribute:\n  - `name` | `specified` | `ownerElement`\n\n* [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)\n\t\t\n  readonly attribute:\n  - `length`\n  \n  method:\n  - `item(index)`\n\t\n* [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)\n\n  readonly attribute:\n  - `length`\n  \n  method:\n  - `getNamedItem(name)`\n  - `setNamedItem(arg)`\n  - `removeNamedItem(name)`\n  - `item(index)`\n  - `getNamedItemNS(namespaceURI, localName)`\n  - `setNamedItemNS(arg)`\n  - `removeNamedItemNS(namespaceURI, localName)`\n\t\t\n* [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node\n\t\n  method:\n  - `substringData(offset, count)`\n  - `appendData(arg)`\n  - `insertData(offset, arg)`\n  - `deleteData(offset, count)`\n  - `replaceData(offset, count, arg)`\n\t\t\n* [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData\n\t \n  method:\n  - `splitText(offset)`\n\t\t\t\n* [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)\n* [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData\n\t\n* [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)\n\t\n  readonly attribute:\n  - `name` | `entities` | `notations` | `publicId` | `systemId` | `internalSubset`\n\t\t\t\n* Notation : Node\n\t\n  readonly attribute:\n  - `publicId` | `systemId`\n\t\t\t\n* Entity : Node\n\t\n  readonly attribute:\n  - `publicId` | `systemId` | `notationName`\n\t\t\t\n* EntityReference : Node \n* ProcessingInstruction : Node \n\n  attribute:\n  - `data`\n  readonly attribute:\n  - `target`\n\t\t\n### DOM level 3 support:\n\n* [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)\n\t\t\n  attribute:\n  - `textContent`\n  \n  method:\n  - `isDefaultNamespace(namespaceURI)`\n  - `lookupNamespaceURI(prefix)`\n\n### DOM extension by xmldom\n\n* [Node] Source position extension; \n\t\t\n  attribute:\n  - `lineNumber` //number starting from `1`\n  - `columnNumber` //number starting from `1`\n\n## Specs\n\nThe implementation is based on several specifications:\n\n<!-- Should open in new tab and the links in the SVG should be clickable there! -->\n<a href=\"https://raw.githubusercontent.com/xmldom/xmldom/master/docs/specs.svg\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" >![Overview of related specifications and their relations](docs/specs.svg)</a>\n\n### DOM Parsing and Serialization\n\nFrom the [W3C DOM Parsing and Serialization (WD 2016)](https://www.w3.org/TR/2016/WD-DOM-Parsing-20160517/) `xmldom` provides an implementation for the interfaces:\n- `DOMParser`\n- `XMLSerializer`\n\nNote that there are some known deviations between this implementation and the W3 specifications.\n\nNote: [The latest version of this spec](https://w3c.github.io/DOM-Parsing/) has the status \"Editors Draft\", since it is under active development. One major change is that [the definition of the `DOMParser` interface has been moved to the HTML spec](https://w3c.github.io/DOM-Parsing/#the-domparser-interface)\n\n\n### DOM\n\nThe original author claims that xmldom implements [DOM Level 2] in a \"fully compatible\" way and some parts of [DOM Level 3], but there are not enough tests to prove this. Both Specifications are now superseded by the [DOM Level 4 aka Living standard] wich has a much broader scope than xmldom.\n\nxmldom implements the following interfaces (most constructors are currently not exposed):\n- `Attr`\n- `CDATASection`\n- `CharacterData`\n- `Comment`\n- `Document`\n- `DocumentFragment`\n- `DocumentType`\n- `DOMException` (constructor exposed) \n- `DOMImplementation` (constructor exposed)\n- `Element`\n- `Entity`\n- `EntityReference`\n- `LiveNodeList`\n- `NamedNodeMap`\n- `Node` (constructor exposed)\n- `NodeList`\n- `Notation`\n- `ProcessingInstruction`\n- `Text`\n\nmore details are available in the (incomplete) [API Reference](#api-reference) section.\n\n### HTML\n\nxmldom does not have any goal of supporting the full spec, but it has some capability to parse, report and serialize things differently when \"detecting HTML\" (by checking the default namespace).\nThere is an upcoming change to better align the implementation with the latest specs, related to <https://github.com/xmldom/xmldom/issues/203>.\n\n### SAX, XML, XMLNS\n\nxmldom has an own SAX parser implementation to do the actual parsing, which implements some interfaces in alignment with the Java interfaces SAX defines:\n- `XMLReader`\n- `DOMHandler`\n\nThere is an idea/proposal to make it possible to replace it with something else in <https://github.com/xmldom/xmldom/issues/55>\n","_attachments":{},"homepage":"https://github.com/xmldom/xmldom","bugs":{"url":"https://github.com/xmldom/xmldom/issues"},"license":"MIT"}