{"name":"xmldom","version":"0.1.29","description":"A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).","keywords":["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],"author":{"name":"jindw","email":"jindw@xidea.org","url":"http://www.xidea.org"},"homepage":"https://github.com/jindw/xmldom","repository":{"type":"git","url":"git://github.com/jindw/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":[{"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":"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":"http://github.com/jindw/xmldom/issues","email":"jindw@xidea.org"},"license":"(LGPL-2.0 or MIT)","gitHead":"226be66a785fd6ccc11ccdd14bd32fa4c9f65780","_id":"xmldom@0.1.29","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-BoY9MWe3mSF13nuVxZHwJrY42Z8apHhkUvi6lJiez1pnGqZgL/HhAbkpaFqRj5ynlETzIYJdBXsrCMW69uSooA==","shasum":"32ed99cb6550e2e1342578f5ad179b1e60e7d220","tarball":"http://registry-npm.ywwl.com/xmldom/download/xmldom-0.1.29.tgz","fileCount":10,"unpackedSize":70978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+/kVCRA9TVsSAnZWagAAM3kP/jbW3upQ22G1UvWi1684\ntqF3xxxwe2rr/2eTxUnMiXWQ/r57/NdJFiKE1rKvM9LvwZLYUDu9JnjenuQh\nFpTWF7SbAsCHIl1oE4Y0q7190LTH261Y/tn0hQN3S2Gh2VX4EuhV4vm8cK1W\nDakgD6uAwIR0WAHwzlypiEVK0xYVB7UjKxd7ONXAn2Zqo1YXnOxpqDmOE6ZT\nh8eosBen6cX4wzZLfl5r+3OfRK65vpO4P3RkwKtSsZvzufYPz7opa1l8iAE7\nVT5cjdSJ8RYz9Hrsf390MCJAuy3TZ6C12idekk7hgFWSzqplXfqmPr986dss\nrgFNQa/Uw+hqpi39OFFOr+i23tsCewDy7BDG+GclUWmMkBGMJRHmzArjmWF5\nh1iUTl8wfmmZAzuKgDyEL7B5O1pAuYasq7RhwU4GId8YJw6dVs86VSTw1uD7\nDB7ihdxstMOpRQa+j0bHTLp7nP7rKpZy3q73IKx4dMTgNXSbTma3lpc2vO2t\nJ2FYtVX9BRz86kKE8PTg+zbnhyeJSdF187Q+qNNW8IHtMAwySNSWkrcKbvTW\n6b30sjdafOoLgwaXeJytmTCxhp6FXQmXpOw5Vo69sGCW5YuvwXUknWm+Npxt\nKEVvgCGs0v+XiMwGibQ3I/qxOKDK3NOga/jQ2pTRNbygFv4Lk+/nZ9MkqWUK\nvKh1\r\n=D6PZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMM8oBW2dX71dBWMt3nCqY3+Lbe3Y8vnTNuiNGEpfH9QIhANJmBqqA8UMrDSIY2QO4Iv8D5Y8OiEzNLQ1U2FYS4kNm"}],"size":19969,"noattachment":false,"key":"/xmldom/-/xmldom-0.1.29.tgz"},"_npmUser":{"name":"brodybits","email":"chris@brody.consulting"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmldom_0.1.29_1576794389390_0.312182129753386"},"_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":1576794389525,"_cnpm_publish_time":1576794389525,"dist-tags":{"latest":"0.6.0"}}