Re: Streaming XML
- From: nano2k <adrian.rotaru@xxxxxxxxxxx>
- Date: Wed, 19 Sep 2007 00:58:48 -0700
On 19 Sep, 10:48, nano2k <adrian.rot...@xxxxxxxxxxx> wrote:
Hi
In my application I manage an XmlDocument object.
This document object grows bigger and bigger while the application
runs.
The document is used as a buffer of data, so it's frequently updated
and read, that's why I'm keeping it in mamory.
When the application closes, I save the cached data on the disk. Next
time the app starts, I load the saved data and continue working with
that buffered data.
I have 2 issues regarding this:
1. The first is related to memory usage. My document may grow up to
tens or hundreds megabytes in occupied memory. Is it another proper
way of keeping this object besides the "classical" in-memory?
2. When saving the document, I want to compress it. To do that, I have
a compressor class that compresses a IO.Stream. How do I stream the
XML document?
Thanks.
To be more explicit, I want to obtain the result of OuterXml property
using a Stream.
Calling OuterXml will in fact produce a HUGE string to be compressed
and this will produce a very high memory peek, which it MUST be
avoided.
.
- References:
- Streaming XML
- From: nano2k
- Streaming XML
- Prev by Date: Re: Need to escape ]]>
- Next by Date: Re: How To View well formatted XML in IE 6.0
- Previous by thread: Streaming XML
- Index(es):
Relevant Pages
|