You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Se...@amat.com on 2012/09/26 09:24:42 UTC

DOM parser consumes lot of memory

Hi All,

In our application, we use the xceres DOM parser to convert the given input in to XML structure. We are seeing an issue here, where the DOM parser generates a huge XML data for even a small input data. Because of this at some times our application crashes with out of memory error. Currently we are analyzing the DOM parser output to understand what additional stuff it adds to the original data that makes the memory to grow. Is there a way to avoid making the DOM parser consuming less memory? Or generate a more simple XML output?

While going through net for a solution I did find some one saying like
>>"Thus, for best performance when using Xerces DOM with smaller documents you should disable the deferred node expansion feature. For larger documents (~100K and higher) the deferred DOM offers better performance than non-deferred DOM but uses a large memory size."

Can anyone suggest how to disable the deferred node expansion?

Thanks,
Sendil