You *can* Java-serialize the DOM representation, but it's generally a bad idea. Java serialization handles this type of tree structure poorly, and for most documents you'll end up taking much longer to Java-serialize/unserialize than it would take to text-serialize/unserialize. The Java-serialized form is also much larger than the text-serialized form. You can see some actual figures for this in my IBM developerWorks article at: http://www-106.ibm.com/developerworks/xml/library/x-injava/index.html#13

I've been horrible about posting updated results to my web site at http://www.sosnoski.com, but will try to get them out over the weekend. One interesting thing I've noticed with both Xerces 1 and 2 is that the default mode of using deferred node expansion appears to have a substantial per-document memory overhead. This far outweighs any savings from the compressed node handling for small documents. Anybody have any clues why that might be the case?

 - Dennis

Christopher Giblin wrote:

Hi
If I have an instantiated DOM, can I Java-serialize it (ie, not XML
serialization) without restriction?
At first glance, it looks like Xerces 2.0 DOM is serializable - is
intended to be so through and through? Or is it "java-serialize at your own
risk"?
Sorry if I missed this in the documentation - I need to be sure...
Thanks,
chris



---------------------------------------------------------------------
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]



Reply via email to