We use Xerces for large files up to 30 MB. We still havnt have time to rewrite it to SAX and we do get about 15 - 20 times larger memory usage (using 1.5.2) than the file. The real problem is that Xerces crashes when windows start swapping memory if all pysical memory is used. Still Xerces is much better than explorer who use about 80 -90 times more memory! SO, anybody thinking about using DOM for file larger than 10 MB - don't do it - use SAX.
-----Mensaje original----- De: Jan Dvorak [mailto:[EMAIL PROTECTED] Enviado el: miércoles 21 de agosto de 2002 14:33 Para: [EMAIL PROTECTED]; Gude Reshma Asunto: Re: Memory consideratino in creating XML using DOM Hi, Folklore has it that the DOM in memory can take up five to ten times the size of the document file. The alternative is, of course, SAX. But programming for SAX is not easy. Another alternative, which I like more and more, is the dom4j (www.dom4j.org) ElementHandler idea. This gives you a chance to erase portions of the tree during the parse, when you are done with them. Jan Dvorak Dne středa 21 srpen 2002 07:13 Gude Reshma napsal(a): | hi | | if memory is an important consideration , is it advisable to create an XML | using DOM? specially a large XML file? | | if not then what is the alternative? | | | | --------------------------------- | Do You Yahoo!? | HotJobs, a Yahoo! service - Search Thousands of New Jobs --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
