views:

24

answers:

1

I'm loading a XML file via Ajax using jQuery.

For my tests, I use a file on my file system. It seems all is fine in other browsers but the response headers got by IE has no content-type header. So I get a parsererror. (The XML is valid, I checked it (twice).)

How can I bypass this problem ?

+1  A: 

You can install a web server (IIS, Apache, etc.) and configure it to serve files from the relevant directory. E.g., http://localhost/myfile.xml .

Alternately, you can use the responseText property and parse it manually.

steamer25