Large XML text node

Hi,
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?
Thanks
aquaswAsked:
Who is Participating?
 
CEHJCommented:
Can you read it via SAX?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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.
0
 
hoomanvCommented:
very large XML documents may require using a SAX parser that does not store the document in memory
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.