xml-parse-from-string
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
index.js
module.exports = (function xmlparser() { | ||
//common browsers | ||
if (typeof window.DOMParser !== 'undefined') { | ||
if (typeof self.DOMParser !== 'undefined') { | ||
return function(str) { | ||
var parser = new window.DOMParser() | ||
var parser = new self.DOMParser() | ||
return parser.parseFromString(str, 'application/xml') | ||
@@ -11,6 +11,6 @@ } | ||
//IE8 fallback | ||
if (typeof window.ActiveXObject !== 'undefined' | ||
&& new window.ActiveXObject('Microsoft.XMLDOM')) { | ||
if (typeof self.ActiveXObject !== 'undefined' | ||
&& new self.ActiveXObject('Microsoft.XMLDOM')) { | ||
return function(str) { | ||
var xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM") | ||
var xmlDoc = new self.ActiveXObject("Microsoft.XMLDOM") | ||
xmlDoc.async = "false" | ||
@@ -28,2 +28,2 @@ xmlDoc.loadXML(str) | ||
} | ||
})() | ||
})() |
{ | ||
"name": "xml-parse-from-string", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "DOMParser.parseFromString for XML with IE8 fallback", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,3 +21,3 @@ # xml-parse-from-string | ||
Be weary of subtle differences between implementations, such as case-sensitivity in `attribute.nodeName`. | ||
Be wary of subtle differences between implementations, such as case-sensitivity in `attribute.nodeName`. | ||
@@ -24,0 +24,0 @@ PRs for Node version welcome. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3981
4
25