[jQuery] Re: Parse XML with IE

2007-05-15 Thread philguillard


I finally found out when preparing a clean sample to put online, that's 
usually the case!

: the presence of the metadata plugin ! Crazy
Just the js inclusion since i was not really using it.
http://fyneworks.blogspot.com/2007/04/fix-for-jquery-bug-in-ie-working-with.html

Thanks
Phil

Ⓙⓐⓚⓔ wrote:

the name of the program is 'test' in the root directory of the server... it
sets the header to be text/xml...

inside success, response is the xml tree of the response, not much good for
debugging. If the alert returns '' for the result, I guess there is a
problem. in the complete callback, you can check the 
response.responseXMLand

response.responseText

do you have a live link??
your code looks like it should, assuming it's actually getting the xml
result you expect..

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




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"


hello


$.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
>>
>
>
>







[jQuery] Re: Parse XML with IE

2007-05-15 Thread philguillard


Jake and Benjamin, thanks for help,

No success with  nor $("root/jquery", response).text()

In the complete callback i get my content with response.responseText 
right. I'll try to set something online for tomorrow. Mybe i should try 
with another IE6/another PC.


Anyway i'm happy to hear this can work, i was not sure it could.

Phil



Ⓙⓐⓚⓔ wrote:

the name of the program is 'test' in the root directory of the server... it
sets the header to be text/xml...

inside success, response is the xml tree of the response, not much good for
debugging. If the alert returns '' for the result, I guess there is a
problem. in the complete callback, you can check the 
response.responseXMLand

response.responseText

do you have a live link??
your code looks like it should, assuming it's actually getting the xml
result you expect..

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




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"


hello


$.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
>>
>
>
>







[jQuery] Re: Parse XML with IE

2007-05-15 Thread Benjamin Sterling

Phil,
Not sure if it will help, but make you declaration 

try $("root/jquery", response).text() instead of $("/root/jquery",
response).text() and see if that returns anything, that is what I use with
no issue.

--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Parse XML with IE

2007-05-15 Thread Ⓙⓐⓚⓔ

the name of the program is 'test' in the root directory of the server... it
sets the header to be text/xml...

inside success, response is the xml tree of the response, not much good for
debugging. If the alert returns '' for the result, I guess there is a
problem. in the complete callback, you can check the response.responseXMLand
response.responseText

do you have a live link??
your code looks like it should, assuming it's actually getting the xml
result you expect..

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



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"


hello


$.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
>>
>
>
>





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Parse XML with IE

2007-05-15 Thread philguillard


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"


hello


$.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







[jQuery] Re: Parse XML with IE

2007-05-15 Thread Ⓙⓐⓚⓔ

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





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Parse XML with IE

2007-05-15 Thread Benjamin Sterling

Phil, set your datatype to xml, ie. dataType : 'xml',



--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com