Re: Get "java.lang.OutOfMemoryError" when Parsing an XML useing DOM



NeoGeoSNK <ny1022@xxxxxxxxx> wrote:
I can't wait any more time, the job is take nearly 2 hours but haven't
finished yet.I think I'll try the SAX api, is there more fast api to
parsing XML in java?

Out of curiosity: You wrote that you're using a
self-written xml-parser... any chance that you
accidentally created an endless loop?

You should add progress indicators, by inserting
System.out.println("..."), Even if this doesn't
make the code faster, it might give you an indication
on what really goes on(or wrong). (perhaps, after 2
hours it is still busy processing the first sub-item
of the input)

.