Thank you guys.
I still can't manage to parse any XML data with IE6.

True it is cleaner to use dataType : 'xml' and use success, but :

Whith a basic sample, and i checked mime type was really "text/xml"
<?xml version="1.0"?>
<root>
<jquery>hello</jquery>
</root>

$.ajax({
        type: "GET",
        url: "/test", 
        dataType : 'xml',               
        success: function(response){
                        alert("A success="+response);
                        alert("B "+typeof response);
                        alert("C "+$("/root/jquery", response).text());
        } ,
        error: function(o,e1,e2){
                        alert("error"+e1);
        }
});

On [A] i have "sucess="
On [B] i have "object"
Erro is launched on [C]
==> i suppose object is empty
Works fine on firefox.

Any idea?

Phil

Ⓙⓐⓚⓔ wrote:
Phil, your code says:

do a get, when it's complete look for rootnode. BUT, what if the response
has no xml, is malformed, or got some other error. You're ignoring all
possible errors!

success callback calls back when you have a good result (or pretty good)
error is called for most errors.
complete needs to check what it got.

I think we need more help for complete coding, I posted a ticket with my
results... IE was not included though!

http://dev.jquery.com/ticket/1145#preview

On 5/15/07, philguillard <[EMAIL PROTECTED]> wrote:



Hi all,

I know IE6 (maybe 7) is known to have limited ability to parse XML but
it seems it can.
After an ajax call, i'd like to parse the xml file like this :

$.ajax({
        type: "GET",
        url: url,
        complete: function(response){
                var rootNode = $("/rootNode", response.responseXML);
        }
});

Is there a hack?, is there something specific about the XML file it can
parse (ex: no node attributes).


Regards,

Phil




Reply via email to