Opened 12 years ago

Last modified 12 years ago

#8140 closed defect

combine XML DOM creation code — at Initial Version

Reported by: Adam Peller Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.3
Component: Dojox Version: 1.2.1
Keywords: Cc: James Burke
Blocked By: Blocking:

Description

_base.xhr, dojox.data.dom and dojox.xml.parser all implement logic to instantiate the IE ActiveX XMLDOM, which is brittle as it is. Combine the code. Also, consider deprecating dojox.data.dom.createDocument.

Consider using the code in the _base.query test for maximum reuse. It's really not that bad a kludge, on second thought.

			function createDocument(xml){
				var fauxXhr = { responseText: xml };
				if("DOMParser" in dojo.global){
					var parser = new DOMParser();
					fauxXhr.responseXML = parser.parseFromString(xml, "text/xml");
				}
				// kludge: use dojo.xhr contentHandler for XML to process IE XMLDOC as needed
				return dojo._contentHandlers["xml"](fauxXhr); // DOMDocument
			}

Change History (0)

Note: See TracTickets for help on using tickets.