V
Vollerthun
Hi Guis.
I try to figure out how many bytes a given XML-Document
(org.w3c.dom.Document)
occupies.
To be more specific: The final XML-Document is generated, but
basically consists of several XML-Files that all live on hard disk.
The resulting file is sent to a client that needs to know the (upper
bound) size of the document beforehand (as to allocate memory or
something like that)
At the moment I simply add up the sizes of every single file I read,
but that's not the elegant way, is it?
What happens if I start to generate XML-Documents in memory rather
than reading "real" files? I'll tell you what: I'm having a #@%&#
problem. I'd have to serialize that document to disk, find out the
size of that document and add it to the overall size. (Mark it for
deletion afterwards)
I seem to be incapable of finding any meaningful google-result neither
in the web nor in the groups. Same at java.sun.com
If you have any idea where I could keep on searching or probably have
a hint on how to proceed I'd be very pleased.
tom
I try to figure out how many bytes a given XML-Document
(org.w3c.dom.Document)
occupies.
To be more specific: The final XML-Document is generated, but
basically consists of several XML-Files that all live on hard disk.
The resulting file is sent to a client that needs to know the (upper
bound) size of the document beforehand (as to allocate memory or
something like that)
At the moment I simply add up the sizes of every single file I read,
but that's not the elegant way, is it?
What happens if I start to generate XML-Documents in memory rather
than reading "real" files? I'll tell you what: I'm having a #@%&#
problem. I'd have to serialize that document to disk, find out the
size of that document and add it to the overall size. (Mark it for
deletion afterwards)
I seem to be incapable of finding any meaningful google-result neither
in the web nor in the groups. Same at java.sun.com
If you have any idea where I could keep on searching or probably have
a hint on how to proceed I'd be very pleased.
tom