[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Large XML text node

Posted on 2006-05-09
Medium Priority
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
  • 2
LVL 86

Accepted Solution

CEHJ earned 600 total points
ID: 16636994
Can you read it via SAX?
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 450 total points
ID: 16637438
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

hoomanv earned 450 total points
ID: 16637441
very large XML documents may require using a SAX parser that does not store the document in memory
LVL 86

Expert Comment

ID: 16677878

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month18 days, 20 hours left to enroll

834 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