{"name":"xmldom","version":"0.3.0","description":"A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],"author":{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},"homepage":"https://github.com/xmldom/xmldom","repository":{"type":"git","url":"git://github.com/xmldom/xmldom.git"},"main":"lib/dom-parser.js","scripts":{"test":"proof platform win32 && proof test */*/*.t.js || t/test"},"engines":{"node":">=10.0.0"},"dependencies":{},"devDependencies":{"proof":"~7.0.9"},"maintainers":[{"email":"alan@prettyrobots.com","name":"bigeasy"},{"email":"chris@brody.consulting","name":"brodybits"},{"email":"jindw@xidea.org","name":"jindw"},{"email":"jinyun.jin@gmail.com","name":"jinjinyun"},{"email":"kethinov@gmail.com","name":"kethinov"},{"email":"yaronn01@gmail.com","name":"yaron"}],"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/"},{"name":"Eric Newport","email":"kethinov@gmail.com","url":"https://github.com/kethinov"}],"bugs":{"url":"https://github.com/xmldom/xmldom/issues"},"license":"(LGPL-2.0 OR MIT)","gitHead":"69d754508a910919ddc108b47d18327f96a079f2","_id":"xmldom@0.3.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g==","shasum":"e625457f4300b5df9c2e1ecb776147ece47f3e5a","tarball":"http://registry-npm.ywwl.com/xmldom/download/xmldom-0.3.0.tgz","fileCount":8,"unpackedSize":76602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX9ggCRA9TVsSAnZWagAAtxIQAIlGUWw6yJNP6a8uIH0B\nGsp6tl1eePvhN4nDGqshvJuP8D5mV6HuAKDE5Jn5EcNhHf/rhykddKGzoDzR\n9uRLvSquvhC0KWX5/AwuP+VGxlCivQi6v6Q68GNeGEq+2DpftyZX46On0evH\n6gHvL7jVEM41zO1BCZm1sNfk/99/7D7r2GtSS6wfnTuzX06iSVzolEb6OPu8\nGVJbL6zMDBjbN1pAU5+sfU61YXaunqUkyEJuDaXKFvRzY3ne1mexO0Z6hNOv\nNUCci8+C83CtmiCybaMx0ai1/bKK1OSNlH1oO2J4g809f+8UHpYJBC3Vkonz\nTJVnX8bFuc2scBUU9jSXl5956KTS5OvHzGhKTfsFTwCtJ/dqQlDjCjNv5AvD\nHsfvTU7lrvaddbl1/nKhTcG4VXU4ZD7/VvSzodEYdspaTBaR3kgBVC1jRnuD\nGHezj6DFtbi3WQkFneUDJShmkQtvOr1RjuLWQN9mX+z3+w5Z2H9IgDZx3ows\nqEpGFt0/2zOU0Zjdw2IBtRze+eD0WiC764aHBsCxrVY7uyEeDuDCrh8ZuWTY\njZljXSckRWfGQgFc7ZtmM7KuN+jAqQ4o+zIsYpS1n1Ijesr1OaXkaJsL5deh\nbbYGVF6UzdCRlL9/aIuBWAZ53n9fiuqUw7OqkeaDS3K7prYK/RNdqhEeGgNs\nf2Vb\r\n=g7Uc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMSNosOGMGxvXd5jpK5gDh/+k0YBwBNMCP1wPhnWECxAiEAkdL2bm/e18qG/EBJvcgO0sIzW7UgGK3/nt64LN4ENOY="}],"size":21768,"noattachment":false,"key":"/xmldom/-/xmldom-0.3.0.tgz"},"_npmUser":{"name":"kethinov","email":"kethinov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom_0.3.0_1583339551994_0.8993619065484755"},"_hasShrinkwrap":false,"deprecated":"Deprecated due to CVE-2021-21366 resolved in 0.5.0","readme":"# XMLDOM\n\n[![license](https://img.shields.io/npm/l/xmldom?color=blue&style=flat-square)](LICENSE)\n[![npm](https://img.shields.io/npm/v/xmldom?style=flat-square)](https://www.npmjs.com/package/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%20wanted?color=darkgreen&style=flat-square)](https://github.com/xmldom/xmldom/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)\n[![Mutation report](https://camo.githubusercontent.com/ee312c4ebce7784ce9f785757eba5d6e33e6d950/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324662726f647962697473253246786d6c646f6d2532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/brodybits/xmldom/master)\n\nA JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully\ncompatible with `W3C DOM level2`; and some compatible with `level3`. Supports\n`DOMParser` and `XMLSerializer` interface such as in browser.\n\n**Original project location:** <https://github.com/jindw/xmldom>\n\nInstall:\n-------\n>npm install xmldom\n\nExample:\n====\n```javascript\nconst { DOMParser } = require('xmldom')\n\nconst doc = new DOMParser().parseFromString(\n    '<xml xmlns=\"a\" xmlns:c=\"./lite\">\\n' +\n        '\\t<child>test</child>\\n' +\n        '\\t<child></child>\\n' +\n        '\\t<child/>\\n' +\n        '</xml>',\n    'text/xml'\n)\ndoc.documentElement.setAttribute('x', 'y')\ndoc.documentElement.setAttributeNS('./lite', 'c:x', 'y2')\nconsole.info(doc)\n\nconst nsAttr = doc.documentElement.getAttributeNS('./lite', 'x')\nconsole.info(nsAttr)\n```\n\nNote: in Typescript and ES6 you can use the import approach, as follows:\n\n```javascript\nimport { DOMParser } from 'xmldom'\n```\n\nAPI Reference\n=====\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 BOM 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```\nDOM level2 method and attribute:\n------\n\n * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)\n\t\n\t\tattribute:\n\t\t\tnodeValue|prefix\n\t\treadonly attribute:\n\t\t\tnodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName\n\t\tmethod:\t\n\t\t\tinsertBefore(newChild, refChild)\n\t\t\treplaceChild(newChild, oldChild)\n\t\t\tremoveChild(oldChild)\n\t\t\tappendChild(newChild)\n\t\t\thasChildNodes()\n\t\t\tcloneNode(deep)\n\t\t\tnormalize()\n\t\t\tisSupported(feature, version)\n\t\t\thasAttributes()\n* [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)\n   The DOMException class has the following constants (and `value` of type `Number`):\n  \n  1. `DOMException.INDEX_SIZE_ERR` (`1`)\n  1. `DOMException.DOMSTRING_SIZE_ERR` (`2`)\n  1. `DOMException.HIERARCHY_REQUEST_ERR` (`3`)\n  1. `DOMException.WRONG_DOCUMENT_ERR` (`4`)\n  1. `DOMException.INVALID_CHARACTER_ERR` (`5`)\n  1. `DOMException.NO_DATA_ALLOWED_ERR` (`6`)\n  1. `DOMException.NO_MODIFICATION_ALLOWED_ERR` (`7`)\n  1. `DOMException.NOT_FOUND_ERR` (`8`)\n  1. `DOMException.NOT_SUPPORTED_ERR` (`9`)\n  1. `DOMException.INUSE_ATTRIBUTE_ERR` (`10`)\n  1. `DOMException.INVALID_STATE_ERR` (`11`)\n  1. `DOMException.SYNTAX_ERR` (`12`)\n  1. `DOMException.INVALID_MODIFICATION_ERR` (`13`)\n  1. `DOMException.NAMESPACE_ERR` (`14`)\n  1. `DOMException.INVALID_ACCESS_ERR` (`15`)\n   \n   The DOMException object has the following properties:\n   code\n   This property is of type Number.\n\n\t * extends the Error type thrown as part of DOM API:\n\n * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)\n\t\t\n\t\tmethod:\n\t\t\thasFeature(feature, version)\n\t\t\tcreateDocumentType(qualifiedName, publicId, systemId)\n\t\t\tcreateDocument(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\t\treadonly attribute:\n\t\t\tdoctype|implementation|documentElement\n\t\tmethod:\n\t\t\tcreateElement(tagName)\n\t\t\tcreateDocumentFragment()\n\t\t\tcreateTextNode(data)\n\t\t\tcreateComment(data)\n\t\t\tcreateCDATASection(data)\n\t\t\tcreateProcessingInstruction(target, data)\n\t\t\tcreateAttribute(name)\n\t\t\tcreateEntityReference(name)\n\t\t\tgetElementsByTagName(tagname)\n\t\t\timportNode(importedNode, deep)\n\t\t\tcreateElementNS(namespaceURI, qualifiedName)\n\t\t\tcreateAttributeNS(namespaceURI, qualifiedName)\n\t\t\tgetElementsByTagNameNS(namespaceURI, localName)\n\t\t\tgetElementById(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\t\treadonly attribute:\n\t\t\ttagName\n\t\tmethod:\n\t\t\tgetAttribute(name)\n\t\t\tsetAttribute(name, value)\n\t\t\tremoveAttribute(name)\n\t\t\tgetAttributeNode(name)\n\t\t\tsetAttributeNode(newAttr)\n\t\t\tremoveAttributeNode(oldAttr)\n\t\t\tgetElementsByTagName(name)\n\t\t\tgetAttributeNS(namespaceURI, localName)\n\t\t\tsetAttributeNS(namespaceURI, qualifiedName, value)\n\t\t\tremoveAttributeNS(namespaceURI, localName)\n\t\t\tgetAttributeNodeNS(namespaceURI, localName)\n\t\t\tsetAttributeNodeNS(newAttr)\n\t\t\tgetElementsByTagNameNS(namespaceURI, localName)\n\t\t\thasAttribute(name)\n\t\t\thasAttributeNS(namespaceURI, localName)\n\n * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node\n\t\n\t\tattribute:\n\t\t\tvalue\n\t\treadonly attribute:\n\t\t\tname|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\t\treadonly attribute:\n\t\t\tlength\n\t\tmethod:\n\t\t\titem(index)\n\t\n * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)\n\n\t\treadonly attribute:\n\t\t\tlength\n\t\tmethod:\n\t\t\tgetNamedItem(name)\n\t\t\tsetNamedItem(arg)\n\t\t\tremoveNamedItem(name)\n\t\t\titem(index)\n\t\t\tgetNamedItemNS(namespaceURI, localName)\n\t\t\tsetNamedItemNS(arg)\n\t\t\tremoveNamedItemNS(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\t\tmethod:\n\t\t\tsubstringData(offset, count)\n\t\t\tappendData(arg)\n\t\t\tinsertData(offset, arg)\n\t\t\tdeleteData(offset, count)\n\t\t\treplaceData(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\t\tmethod:\n\t\t\tsplitText(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\t\treadonly attribute:\n\t\t\tname|entities|notations|publicId|systemId|internalSubset\n\t\t\t\n * Notation : Node\n\t\n\t\treadonly attribute:\n\t\t\tpublicId|systemId\n\t\t\t\n * Entity : Node\n\t\n\t\treadonly attribute:\n\t\t\tpublicId|systemId|notationName\n\t\t\t\n * EntityReference : Node \n * ProcessingInstruction : Node \n\t\n\t\tattribute:\n\t\t\tdata\n\t\treadonly attribute:\n\t\t\ttarget\n\t\t\nDOM level 3 support:\n-----\n\n * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)\n\t\t\n\t\tattribute:\n\t\t\ttextContent\n\t\tmethod:\n\t\t\tisDefaultNamespace(namespaceURI){\n\t\t\tlookupNamespaceURI(prefix)\n\nDOM extension by xmldom\n---\n\n* [Node] Source position extension; \n\t\t\n\t\tattribute:\n\t\t\t//Numbered starting from '1'\n\t\t\tlineNumber\n\t\t\t//Numbered starting from '1'\n\t\t\tcolumnNumber\n","publish_time":1583339552238,"_cnpm_publish_time":1583339552238,"dist-tags":{"latest":"0.6.0"}}