Bug Tracker

Opened 16 years ago

Closed 16 years ago

#1357 closed bug (duplicate)

Bug in selectors for XML in IE6

Reported by: [email protected] Owned by: john
Priority: minor Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: xml selectors Cc:
Blocked by: Blocking:

Description

Reading post about upcoming 1.2 I've changed XML selectors from XPath-like to CSS-like. And, bug 1346 prevented me from using ">" sign to specify immediate children. So I wrote the following code:

function callback(xmldata) {

var response = $("ut_response", xmldata); var total = parseInt($("video_list total", response).text()); ...

}

This code works goon in FF but is being broken in IE6 with the following jQuery code:

unique: function(first) {

var r = [], num = jQuery.mergeNum++;

for ( var i = 0, fl = first.length; i < fl; i++ )

if ( num != first[i].mergeNum ) {

first[i].mergeNum = num; broken line r.push(first[i]);

}

return r;

},

IE6 says that assigning new/unregistered property to XML-node is unsupported operation. So, I've added surrounding try/catch block to assignment:

try { first[i].mergeNum = num; } catch (e) {} Fix XML in IE6

as far as I now there are no duplicates in received XML. Now after new 1.1.3.1 bugfix release I'll rewrite my selectors to use immediate children, but the problem could arise in future.

Attachments (1)

youtube.xml (3.1 KB) - added by [email protected] 16 years ago.
Youtube rest api response

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by [email protected]

Attachment: youtube.xml added

Youtube rest api response

comment:1 Changed 16 years ago by john

Could you re-try this with 1.1.3.1? We resolved some problems with selecting child elements in XML documents in that release, so this may have been fixed.

comment:2 Changed 16 years ago by john

Owner: set to john

comment:3 Changed 16 years ago by john

Resolution: duplicate
Status: newclosed

Duplicate of #1326.

Note: See TracTickets for help on using tickets.