Here's a fn for converting strings to docs:
function stringToDoc(s) { var doc; if (window.ActiveXObject) { doc = new ActiveXObject('Microsoft.XMLDOM'); doc.async = 'false'; doc.loadXML(s); } else doc = (new DOMParser()).parseFromString(s, 'text/xml'); return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null; }
I would like to parse the return string as a dom document. It is impossible for us to change the extension, so I was wondering if there is a possibility to convert the return string to a dom document.