faqts : Computers : Programming : Languages : JavaScript : XML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 14 people (14%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

Why does 'responseXML' have no properties?

Oct 17th, 2006 10:42
Mike T, Rafael Barrero,


responseXML will have no value if there is no Content-type set for your
response.  The two clear ways around this are (good solution) set the
content type of data streamed from the server (either using a file
extension or sending a content-type header) or (hackish solution) by
using the overrideMimeType() method of your xmlhttp object to force the
mime type to 'text/xml'... this solution seems to not be IE friendly.
Either way, if your xml is malformed you will of course encounter errors.