in reply to Re: XML and file size
in thread XML and file size
Rather than slurping the whole XML into a DOM for appending information, a SAX approach can be used. Simply pass through everything but the closing root tag. On encountering it, emit the new node and then the closing root tag.
This is much faster and much more memory friendly.
But yes, appending to XML is expensive.
Just my 2 cents, -gjb-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: XML and file size
by roundboy (Sexton) on Jan 07, 2003 at 18:38 UTC |