Opened 13 years ago

Last modified 11 years ago

#3590 closed enhancement

XmlStore: use dojo.query() more — at Version 7

Reported by: bill Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.3
Component: Query Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Jared Jurkiewicz)

This is nit-picking, but probably XmlStore::_getItems() should be changed to use dojo.query to get the nodes:

var nodes = dojo.query(this._rootItem || "*");

instead of

			nodes = document.getElementsByTagName(this._rootItem);
			nodes = document.documentElement.childNodes;

And then also should use orphan:

return nodes.orphan(function(node){ ... });

rather than

		for(var i = 0; i < nodes.length; i++){
			var node = nodes[i];
			if(node.nodeType != 1 /*ELEMENT_NODE*/){
            var item = this._getItem(node);
		for(var i in items){
			var element = items[i].element;
			element.parentNode.removeChild(element); // make it root
		return items;

Change History (7)

comment:1 Changed 13 years ago by skinner

Owner: changed from skinner to Jared Jurkiewicz

comment:2 Changed 13 years ago by Jared Jurkiewicz

I'm not sure this can be done. As far as I understood it, dojo.query works on HTML, not on XML dom. If you've heard otherwise, please let me know. I've been trying to get a clear answer on that.

comment:3 Changed 13 years ago by Jared Jurkiewicz

According to Alex, it can't be done currently (dojo.query() doesn't support XML dom). But, he did ask for a enchancement request be opened for that, so it was. When Tracker: #3866 goes in, it should work.

comment:4 Changed 13 years ago by Jared Jurkiewicz

Er, that is, this should be addressable.

comment:5 Changed 13 years ago by Jared Jurkiewicz

Milestone: 1.01.1

comment:6 Changed 13 years ago by Jared Jurkiewicz

Milestone: 1.11.2

#3866 isn't in yet, so moving this out.

comment:7 Changed 12 years ago by Jared Jurkiewicz

Description: modified (diff)
Milestone: 1.2tbd
Note: See TracTickets for help on using tickets.