Skip to content

Instantly share code, notes, and snippets.

@dimaxweb
Created May 4, 2013 10:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimaxweb/5517033 to your computer and use it in GitHub Desktop.
Save dimaxweb/5517033 to your computer and use it in GitHub Desktop.
Xml parsing without ActiveX in Internet Explorer.Works only in IE!!!
funtion parseWitoutActiveX(str)
var doc= null;
var xmlIsland = document.createElement('xml');
if(xmlIsland){
xmlIsland.setAttribute('id','xmlActiveXGetRid');
xmlIsland.innerHTML = str;
document.body.appendChild(xmlIsland);
var doc = xmlIsland.XMLDocument;
document.body.removeChild(xmlIsland);
return doc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment