Bug Tracker

Ticket #7854 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

$(XMLResultObject).find(descendant) in IE6 works fine in jQuery-1.3.2 but not in jQuery-1.4.4

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

$(XMLResultObject).find(descendant) in IE6 works fine in jQuery-1.3.2 but not in jQuery-1.4.4

Here is the AJAX call:

Pfizer.CC.Client.Biz.API.Service.ajaxManager.add({

type: "POST", url: serviceUrl, contentType: "application/json; charset=utf-8", data: paramList, dataType: "text", success: function(result) {

dataStore.Result = JSON.parse(result).d; Pfizer.CC.Client.Biz.API.Service.runOnSuccess();

}, error: function() {

Pfizer.CC.Client.Biz.API.Service.runOnFailure();

}

});

Here is the XML stream returned (correctly in both browsers) and set in a string variable:

<?xml version="1.0" standalone="yes"?> <CCBizModel xmlns="CCBizModel"> <BizItem>

<BizContext>Startup</BizContext> <ParameterCollection>

<Parameter>None</Parameter>

</ParameterCollection> <PayLoadCOllection>

<PayLoad>

<HeaderDate>November 10</HeaderDate>

</PayLoad>

</PayLoadCOllection> <Status>Success</Status> <NotificationCollection>

<Notification>All Requests Succeeded</Notification>

</NotificationCollection>

</BizItem> </CCBizModel>

Here is the success method that works in jQuery 1.3.2 but not in jQuery 1.4.4 on IE6:

Pfizer.CC.Client.Biz.API.Service.runOnSuccess = function() {

var dataObject = dataStore.Result;

switch (Pfizer.CC.Client.Biz.API.bizContent) {

case "Startup":

try {

var descendantDataName = "HeaderDate"; var myResult = $(dataObject).find(descendantDataName);

} catch (Error) {

alert(Error);

}

break;

default:

break;

}

end success function

};

Change History

comment:1 Changed 4 years ago by davidekarasek@…

sorry, here is my email address for the ticket: davidekarasek@…

comment:2 Changed 4 years ago by anonymous

Note I'm not allowed to download/use jsFiddle in my environment.

comment:3 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

As documented at api.jquery.com, $() is not intended to parse XML.

comment:4 Changed 4 years ago by dmethvin

Duplicate of #6693.

Note: See TracTickets for help on using tickets.