Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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?

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Where would be the best place to look for documentation on those two methods?

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •