Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion xml2json.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@

this.parseXmlString = function(xmlDocStr) {
var isIEParser = window.ActiveXObject || "ActiveXObject" in window;
var f = navigator.userAgent.search("Firefox");
var isFirefox = (f > -1);
if (xmlDocStr === undefined) {
return null;
}
Expand All @@ -498,7 +500,7 @@
var parser=new window.DOMParser();
var parsererrorNS = null;
// IE9+ now is here
if(!isIEParser) {
if(!isIEParser && !isFirefox) {
try {
parsererrorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0].namespaceURI;
}
Expand Down