XmlHttpRequest & responseXml

M

Marco Laponder

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();
req.open('GET', './transform?resource=xul', false);
req.send(null);

When I print rq.getAllHeaders it says:

Content-type: application/xml

I can create a DOM object by:
var parser = new DOMParser();
var dom = parser.parseFromString(req.responseText, "text/xml");

Anyone got any ideas what can be the problem ? the parseFromString is
very slow for large documents so this is not a good option for me

Kind regards,
Marco Laponder
(e-mail address removed)
 
M

Martin Honnen

Marco Laponder wrote:

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();
req.open('GET', './transform?resource=xul', false);
req.send(null);

When I print rq.getAllHeaders it says:

Content-type: application/xml

A bit odd indeed, do you have a public URL where that occurs?
But you write responseXml while the property is named responseXML, so
maybe you have got the property name wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top