    return ((tmp.document)&& (tmp.document.firstChild ?  tmp.document.firstChild : tmp)); 
dojox.data.dom.createDocument = function(/*string?*/ str, /*string?*/ mimetype){	//	summary:	//		cross-browser implementation of creating an XML document object.	//	//	str:	//		Optional text to create the document from.  If not provided, an empty XML document will be created.	//	mimetype:	//		Optional mimetype of the text.  Typically, this is text/xml.  Will be defaulted to text/xml if not provided.	var _document = dojo.doc;	if(!mimetype){ mimetype = "text/xml"; }	if(str && (typeof dojo.global["DOMParser"]) !== "undefined"){		var parser = new DOMParser();		return parser.parseFromString(str, mimetype);	//	DOMDocument	}else if((typeof dojo.global["ActiveXObject"]) !== "undefined"){		var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ];		for(var i = 0; i<prefixes.length; i++){			try{				var doc = new ActiveXObject(prefixes[i]+".XMLDOM");				if(str){					if(doc){						doc.async = false;						doc.loadXML(str);						return doc;	//	DOMDocument					}else{						console.log("loadXML didn't work?");					}				}else{					if(doc){ 						return doc; //DOMDocument					}				}			}catch(e){ /* squelch */ };		}	}else if((_document.implementation)&&		(_document.implementation.createDocument)){		if(str){			if(_document.createElement){				// FIXME: this may change all tags to uppercase!				var tmp = _document.createElement("xml");				tmp.innerHTML = str;				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			}		}else{			return _document.implementation.createDocument("", "", null); // DOMDocument		}	}	return null;	//	DOMDocument}
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/f907907d297b7f550bcd50597a347fd3c9060c3b/dom.js/clean/data/dom.js