Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] serializing XOM objects

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] serializing XOM objects
  • Date: Tue, 31 May 2005 06:26:14 -0400

Luca Passani wrote:
Elliotte Harold wrote:


Don't save Document objects. Save the real XML instead.

mmm, not really a solution for me. I have performance issues. I start with a 100/150 kb XML file, from which I derive
between 6 and 10 subdocuments. I only render one (toPrettyXML()), while the others are
saved for later in the session (may or may not be used). This works great really great (except for the log problem).

if you're concerned about size you wouldn't pretty print anything. If
you're concerned about performance you'd use a Serializer rather than
toXML.

is there some specific reason why XOM objects cannot be serialized?

Of course XOM objects can be serialized. They can be serialized as
compact, interoperable, easy-to-use, easy-to-debug, easy-tread,
easy-to-understand, robust XML. Now with if you want them serialized in
an opaque, brittle, bulging, platform-specific binary format that breaks
every time you add a field to a class...Hmm I think I just answered the
question :-)

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim





Archive powered by MHonArc 2.6.24.

Top of Page