On 01/12/06, D Bera <[EMAIL PROTECTED]> wrote:
> > efficiently do this using stream readers/ writers so I can just
> > connect the output from that into the XmlReader and never load the
> > whole thing into ram?
>
> One way I would try is to create a BufferedStream stream and create
> your XmlTextReader from it. Use a byte[] as the storage - check the
> XmlTextReader source to see what buffer size they use to read from
> stream. If your filter is well behaved, then it most probably be using
> anything else other that Read(byte[], int offset, int count),
> ReadByte(), Close(). Implement them using your internal buffer. And
> whenever your read anything in your buffer, do a search and replace in
> the buffer.
>
> - dBera

Thanks for the advice, although I just tried running the filter on an
old scribus file and it seems the XmlReader is quite happy to process
xml files that are malformed in this way so it looks like there's no
need for buffering.

I've attached a tweaked version of the filter to the bugzilla page
(http://bugzilla.gnome.org/show_bug.cgi?id=380950) which is now ready
to be committed by someone.

Alex Mac
_______________________________________________
Dashboard-hackers mailing list
Dashboard-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/dashboard-hackers

Reply via email to