Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xmldom

Package Overview
Dependencies
Maintainers
6
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmldom - npm Package Compare versions

Comparing version 0.1.31 to 0.2.0

entities.js

17

dom-parser.js

@@ -5,2 +5,3 @@ function DOMParser(options){

}
DOMParser.prototype.parseFromString = function(source,mimeType){

@@ -13,3 +14,4 @@ var options = this.options;

var defaultNSMap = options.xmlns||{};
var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;
var entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"};
if(locator){

@@ -21,5 +23,3 @@ domBuilder.setDocumentLocator(locator)

sax.domBuilder = options.domBuilder || domBuilder;
if(/\/x?html?$/.test(mimeType)){
entityMap.nbsp = '\xa0';
entityMap.copy = '\xa9';
if(isHTML){
defaultNSMap['']= 'http://www.w3.org/1999/xhtml';

@@ -250,6 +250,7 @@ }

//if(typeof require == 'function'){
var XMLReader = require('./sax').XMLReader;
var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
exports.XMLSerializer = require('./dom').XMLSerializer ;
exports.DOMParser = DOMParser;
var htmlEntity = require('./entities');
var XMLReader = require('./sax').XMLReader;
var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
exports.XMLSerializer = require('./dom').XMLSerializer ;
exports.DOMParser = DOMParser;
//}

@@ -19,6 +19,2 @@ /*

var pt = Class.prototype;
if(Object.create){
var ppt = Object.create(Super.prototype)
pt.__proto__ = ppt;
}
if(!(pt instanceof Super)){

@@ -920,3 +916,3 @@ function t(){};

var buf = [];
var refNode = this.nodeType == 9?this.documentElement:this;
var refNode = this.nodeType == 9 && this.documentElement || this;
var prefix = refNode.prefix;

@@ -923,0 +919,0 @@ var uri = refNode.namespaceURI;

{
"name": "xmldom",
"version": "0.1.31",
"version": "0.2.0",
"description": "A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).",
"keywords": ["w3c","dom","xml","parser","javascript","DOMParser","XMLSerializer"],
"keywords": [
"w3c",
"dom",
"xml",
"parser",
"javascript",
"DOMParser",
"XMLSerializer"
],
"author": "jindw <jindw@xidea.org> (http://www.xidea.org)",
"homepage": "https://github.com/xmldom/xmldom",
"repository": {"type": "git","url": "git://github.com/xmldom/xmldom.git"},
"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"},
"scripts": {
"test": "proof platform win32 && proof test */*/*.t.js || t/test"
},
"engines": {
"node": ">=0.1"
},
"dependencies": {},
"devDependencies": { "proof": "0.0.28" },
"maintainers": [{"name": "jindw","email": "jindw@xidea.org","url": "http://www.xidea.org"}],
"devDependencies": {
"proof": "0.0.28"
},
"maintainers": [
{
"name": "jindw",
"email": "jindw@xidea.org",
"url": "http://www.xidea.org"
}
],
"contributors": [
{"name" : "Yaron Naveh","email" : "yaronn01@gmail.com","web" : "http://webservices20.blogspot.com/"},
{"name" : "Harutyun Amirjanyan","email" : "amirjanyan@gmail.com","web" : "https://github.com/nightwing"},
{"name" : "Alan Gutierrez","email" : "alan@prettyrobots.com","web" : "http://www.prettyrobots.com/"}
{
"name": "Yaron Naveh",
"email": "yaronn01@gmail.com",
"web": "http://webservices20.blogspot.com/"
},
{
"name": "Harutyun Amirjanyan",
"email": "amirjanyan@gmail.com",
"web": "https://github.com/nightwing"
},
{
"name": "Alan Gutierrez",
"email": "alan@prettyrobots.com",
"web": "http://www.prettyrobots.com/"
}
],
"bugs": {"email": "jindw@xidea.org","url": "http://github.com/jindw/xmldom/issues"},
"bugs": {
"email": "jindw@xidea.org",
"url": "http://github.com/jindw/xmldom/issues"
},
"license": "(LGPL-2.0 or MIT)"
}

@@ -603,19 +603,2 @@ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]

function _set_proto_(thiz,parent){
thiz.__proto__ = parent;
return thiz;
}
if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
_set_proto_ = function(thiz,parent){
function p(){};
p.prototype = parent;
p = new p();
for(parent in thiz){
p[parent] = thiz[parent];
}
return p;
}
}
function split(source,start){

@@ -622,0 +605,0 @@ var match;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc