Forum Moderators: open

Message Too Old, No Replies

XML Node Data Cut Off

What's the maximum size of an XML data node in Firefox?

         

ChainsawXIV

8:06 am on May 10, 2009 (gmt 0)

10+ Year Member



Hey there folks, I'm hoping someone can give me a bit of information, or just help me solve this...

I'm pulling a bunch of data from an XML file via javaScript, and it's working fine in most cases, but my largest single chunk is getting cut off part way through. I've traced this back as far as the call into the XML for the data:

this.displayTemplate = oElement.getElementsByTagName('display')[0].childNodes[0].nodeValue;

Having chased it back this far, the conclusion I've come to is that the parser is truncating the data at right around the 4300 character mark. This issue doesn't occur in IE, but does in FF. Can anyone confirm this conclusion, or offer suggestions on fixing it?

whoisgregg

10:57 pm on May 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never run across this myself, but a bit of googling turned up this bug report for Mozilla [bugzilla.mozilla.org].

In the comments there, someone points out a workaround. Calling

document.normalize()
should resolve it (or you may need to call it on the XML node itself, not 100% sure how the normalize function works).

HTH

ChainsawXIV

5:35 am on May 12, 2009 (gmt 0)

10+ Year Member



Thanks, I'll give that a shot.