- by Sergio Oliveira
- Classification: Code Snippet
- Applies to: Java Script, XML, DOM
// Mozilla and Netscape browsers
if (document.implementation.createDocument) {
var parser = new DOMParser()
doc = parser.parseFromString(xmlString, "text/xml")
// MSIE
} else if (window.ActiveXObject) {
doc = new ActiveXObject("Microsoft.XMLDOM")
doc.async="false"
doc.loadXML(xmlString)
}
return myDocument;
