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

xml-parse-from-string

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-parse-from-string - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

LICENSE.md

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.

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