is there any limit on responseXML in mozilla?

E

ErkA

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, Opera everything is OK, but in mozilla
if I use responseXML method, the string length more then 4096 is cutted
(note that xml is download whole, only when I want to use some element
for example:
xmlhttp.responseXML.getElementsByTagName('ProdList').item(0).firstChil
d.data than in mozilla this string is cutted), but if I use
responseText - everything is working good (in 3 browsers).
pls check this site:

http://bazarek.pl/txt/text.html - responseText
http://bazarek.pl/txt/xml.html - responseXML

What is wrong?
 
M

Martin Honnen

ErkA wrote:

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, Opera everything is OK, but in mozilla
if I use responseXML method, the string length more then 4096 is cutted

That is a known issue with Mozilla's XML parsing, instead of putting
everything into one text node the parser builds text nodes for each
chunk of 4096 characters so in your example
responseXML.getElementsByTagName('ProdList')[0].childNodes.length
yields 4 for instance.
You need to call
responseXML.normalize()
to fix that or use
responseXML.getElementsByTagName('ProdList')[0].textContent
 
E

ErkA

Martin said:
responseXML.getElementsByTagName('ProdList')[0].textContent

THANK YOU INDEED. From friday I've been looking for solutions, and this
is working as I wanted! Thanks again!
 

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
474,002
Messages
2,570,258
Members
46,858
Latest member
FlorrieTuf

Latest Threads

Top