Opened 11 years ago

Closed 11 years ago

#8140 closed defect (fixed)

combine XML DOM creation code

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 (last modified by Adam Peller)

_base.xhr, dojo.io.frame, 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
			}

Attachments (1)

dojox.xml_20081201.patch (44.6 KB) - added by Jared Jurkiewicz 11 years ago.
Initial patch that moves the dojox.data.dom functions to dojox.xml, and does some general cleanup on projects that used dojox.data.dom

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by Adam Peller

Cc: James Burke added
Description: modified (diff)

Changed 11 years ago by Jared Jurkiewicz

Attachment: dojox.xml_20081201.patch added

Initial patch that moves the dojox.data.dom functions to dojox.xml, and does some general cleanup on projects that used dojox.data.dom

comment:2 Changed 11 years ago by Jared Jurkiewicz

(In [15961]) Minor update to localise lookup of XML parsers by using _base private function. refs #8140

comment:3 Changed 11 years ago by Adam Peller

(In [15962]) Style changes. Refs #8140

comment:4 Changed 11 years ago by Adam Peller

(In [15963]) Style changes. Refs #8140

comment:5 Changed 11 years ago by Adam Peller

(In [15965]) unb0rk forEach loops from [15953]. Refs #8140

comment:6 Changed 11 years ago by Jared Jurkiewicz

Status: newassigned

comment:7 Changed 11 years ago by Jared Jurkiewicz

(In [15968]) Removed unused require related to xml. refs #8140

comment:8 Changed 11 years ago by Jared Jurkiewicz

Milestone: tbd1.3

comment:9 Changed 11 years ago by Jared Jurkiewicz

Resolution: fixed
Status: assignedclosed

Going ahead and closing this as the code has been moved, tested, etc.

Note: See TracTickets for help on using tickets.