Large XML text node

Posted on 2006-05-09
Last Modified: 2013-11-23
I have an XML with very large element in it (around 5M). When I try to read it (using apache DOM implementation), The Text element that is expected is not there and its parent element as no children.
Do they have a size limit for Text node? Can I change this limit?
Question by:aquasw
    LVL 86

    Accepted Solution

    Can you read it via SAX?
    LVL 30

    Assisted Solution

    I think increasing the amount memory allocated to the JVM using the -Xmx option should do the trick, however DOM is not suited for very large files (which cannot be loaded to memory at one time because it attemps to create the entire tree-structure/ object-model). So you should use SAX for bigger files like CEHJ said.
    LVL 14

    Assisted Solution

    very large XML documents may require using a SAX parser that does not store the document in memory
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    The viewer will learn how to implement Singleton Design Pattern in Java.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now