473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

empty responseXML from XMLHttpRequest with no parse error

I am using the XMLHttpRequest object to get an XML response from a
servlet. I check the readyState (4) on my asynchronous call and also
check the parseError.errorCode (0). Everything seems to work except
that when I retrieve the responseXML it is an empty document.

Does anyone have other ideas on what's going wrong?

Thanks!
Jul 23 '05 #1
2 3103


Lan Vuong wrote:
I am using the XMLHttpRequest object to get an XML response from a
servlet. I check the readyState (4) on my asynchronous call and also
check the parseError.errorCode (0). Everything seems to work except
that when I retrieve the responseXML it is an empty document.

Does anyone have other ideas on what's going wrong?


Does that servlet have a public URL? Is so post it then we can try to
figure out what could be wrong. Maybe the servlet doesn't send the XML
as text/xml or application/xml?

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...
Lan Vuong wrote:
I am using the XMLHttpRequest object to get an XML response from a
servlet. I check the readyState (4) on my asynchronous call and also
check the parseError.errorCode (0). Everything seems to work except
that when I retrieve the responseXML it is an empty document.

Does anyone have other ideas on what's going wrong?


Does that servlet have a public URL? Is so post it then we can try to
figure out what could be wrong. Maybe the servlet doesn't send the XML
as text/xml or application/xml?


Hi Martin,

I checked the servlet and explicitly set the Content-Type to text/xml
and it seems to get the responseXML properly. Thanks for the tip.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marco Laponder | last post by:
Hi All, I am using XmlHttpRequest object within Firefox to get a xml document from the servlet. The reponseText is set but the responseXml is null. My Code is: req = new XMLHttpRequest();...
3
by: joker | last post by:
Thanks in Advance. I'm trying to find out why my responseXML is empty when the Content-Type for my request is "text/xml". I'm calling into a servlet from a web page on the same domain returning...
0
by: lprisr | last post by:
Hi, With XmlHttpRequest object, using .responseText ALWAYS force the data into utf-8. I am trying to preserve encoding, so I am looking to use .responseXML. Also I am using Atlas, so I can't...
2
by: ErkA | last post by:
Hello sorry of omy pure english ;) I think, that something wrong is in mozilla *FF 1,5,0,2* I'm trying to parse a xml file http://bazarek.pl/txt/note.xml by XMLHttpRequest method. In IE,...
7
by: KaNos | last post by:
Hello aspx world, I consume a webservice with Javascript functions. But the response is ok and, very strange, document is null. How to resolve this problem thanks ?????? ...
14
by: webEater | last post by:
I downloaded IE7 and tried out the native XMLHttpRequest support. I think there is an object in IE7 called "XMLHttpRequest" but I ask me why it is called "XML"HttpRequest. I made a request to an...
1
by: vunet.us | last post by:
My XML HTTP Request sends results in responseText. The result is an XML file I will need to parse. After research I determined that a cross browser XML parser will look like this: ...
8
dmjpro
by: dmjpro | last post by:
i m generating a xml file through jsp file using AJAX. my response header in jsp file is like this .. <%@ page contentType = "text/xml;charset = WINDOWS-1252"%> when i do...
8
by: =?ISO-8859-1?Q?Une_B=E9v?==?ISO-8859-1?Q?ue?= | last post by:
I have a page here : <http://thoraval.yvon.free.fr/Fixed_layout/import_nodes.xhtml> where i import nodes using XMLHttpRequest. it's ok when importing an SVG file (click on "Actions" + "Import...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.