C
Chris Smith
Been banging my head against this one for some time. I'm attempting to
use XmlHTTPRequest to read an XML document from the web server and
interact with it using the DOM. So far, I've had less than perfect luck
with IE. What I've established:
- In IE, the responseXML property sometimes returns an empty document.
- It always does so when testing on local files.
- It (sometimes? always?) works fine when pages are served by a web
server.
I saw one comment on the web explaining that it only parses the response
into a DOM in responseXML if the HTTP response's content type is
text/xml. That would kinda make sense, I guess, if I assumed that local
requests simply don't have a content type and so aren't parsed.
Anything else to watch out for? Is there a workaround to force IE to
always parse the response text, even if it doesn't happen to guess that
the format is XML?
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
use XmlHTTPRequest to read an XML document from the web server and
interact with it using the DOM. So far, I've had less than perfect luck
with IE. What I've established:
- In IE, the responseXML property sometimes returns an empty document.
- It always does so when testing on local files.
- It (sometimes? always?) works fine when pages are served by a web
server.
I saw one comment on the web explaining that it only parses the response
into a DOM in responseXML if the HTTP response's content type is
text/xml. That would kinda make sense, I guess, if I assumed that local
requests simply don't have a content type and so aren't parsed.
Anything else to watch out for? Is there a workaround to force IE to
always parse the response text, even if it doesn't happen to guess that
the format is XML?
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation