...

Question about importing XML using DOM in Gecko vs. Internet Explorer

Skyzyx
12-18-2002, 06:05 AM
The question I have is not a "how do you..." question. Actually it's altogether different.

When I import XML data into an HTML/XHTML page using the DOM, I've noticed a quirk.

If I have alot of text stored in a single tag within an XML tag (such as a short story), and I try to import that tag's data and write it to the page with innerHTML, IE handles it just fine. Mozilla, however, will cut the text off after a certain point. But if I break up the text into separate paragraphs and import it, it all works just dandy.

Not that this is a huge deal, but it can get somwhat tedious placing PARAGRAPH tags around the paragraphs in an XML file. Does anyone happen to know if this will be fixed anytime soon?

jkd
12-18-2002, 11:54 AM
Mozilla breaks large text segments into multiple text nodes in order to increase performance.

You can use substringData() or a Range() to get it all.

Skyzyx
12-19-2002, 05:58 AM
Where would be the best place to look for documentation on those two methods?

jkd
12-19-2002, 02:53 PM
www.w3.org/DOM/DOMTR



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum