rem: if(_document.implementation && _document.implementation.createDocument) { 
add: if(_document.implementation && _document.implementation.createDocument){ 
context: dojo.dom.createDocumentFromText = function(/* string */str, /* string? */mimetype){	//	summary	//	attempts to create a Document object based on optional mime-type, using str as the contents of the document	if(!mimetype){ mimetype = "text/xml"; }	if(!dj_undef("DOMParser")){		var parser = new DOMParser();		return parser.parseFromString(str, mimetype);	//	DOMDocument	}else if(!dj_undef("ActiveXObject")){		var domDoc = dojo.dom.createDocument();		if(domDoc){			domDoc.async = false;			domDoc.loadXML(str);			return domDoc;	//	DOMDocument		}else{			dojo.debug("toXml didn't work?");		}	/*	}else if((dojo.render.html.capable)&&(dojo.render.html.safari)){		// FIXME: this doesn't appear to work!		// from: http://web-graphics.com/mtarchive/001606.php		// var xml = '<?xml version="1.0"?>'+str;		var mtype = "text/xml";		var xml = '<?xml version="1.0"?>'+str;		var url = "data:"+mtype+";charset=utf-8,"+encodeURIComponent(xml);		var req = new XMLHttpRequest();		req.open("GET", url, false);		req.overrideMimeType(mtype);		req.send(null);		return req.responseXML;	*/	}else{		var _document = dojo.doc();		if(_document.createElement){			// FIXME: this may change all tags to uppercase!			var tmp = _document.createElement("xml");			tmp.innerHTML = str;			if(_document.implementation && _document.implementation.createDocument) {				var xmlDoc = _document.implementation.createDocument("foo", "", null);				for(var i = 0; i < tmp.childNodes.length; i++) {					xmlDoc.importNode(tmp.childNodes.item(i), true);				}				return xmlDoc;	//	DOMDocument			}			// FIXME: probably not a good idea to have to return an HTML fragment			// FIXME: the tmp.doc.firstChild is as tested from IE, so it may not			// work that way across the board			return ((tmp.document)&&				(tmp.document.firstChild ?  tmp.document.firstChild : tmp));	//	DOMDocument		}	}	return null;}
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/dojo.js.uncompressed.js/buggy/www/resources/dojo-ajax/dojo.js.uncompressed.js