Out of Memory Error while parsing XML file

Hello,

I am working on a program to parse an XML file and get data from it. I am using SAX Parser.

The problem is when i give the file name to the parser, it gives out of memory error. The file size is 20MB.

Is there a way to rectify this error?

I am sorry if this question is already posted in this forum.

Thanks and Regards,

Prasanna.

[382 byte] By [Prasanna_1984a] at [2007-10-2 21:20:09]
# 1

Probably you are hitting the default 64MB limit on the Java object heap.

You don't say which JRE you are using or what your command line arguments are, but if you are just using the Sun JRE with no arguments on a desktop machine, you are limited to 64MB of heap. You can watch the heap fill up with the -XX:+PrintGCDetails

command line argument. You can increase the maximum size of the heap with the -Xmx

flag, for example, raising the maximum to 128MB with -Xmx128m

Peter.Kessler@Sun.COMa at 2007-7-14 0:29:38 > top of Java-index,Desktop,Runtime Environment...