From: Marco Laponder on
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
mlr(a)interchain.nl
From: Martin Honnen on


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?


--

Martin Honnen
http://JavaScript.FAQTs.com/
From: Jeremy Nixon on
Marco Laponder <mlr(a)interchain.nl> 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.

Make sure you're looking for responseXML, not responseXml.

> When I print rq.getAllHeaders it says:
>
> Content-type: application/xml

Try sending "text/xml" instead.

--
Jeremy | jeremy(a)exit109.com