Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] How to make the object of nu.xom.Document may toserialize ?

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Steve Loughran" <steve.loughran AT>
  • Cc: "XOM interest" <xom-interest AT>
  • Subject: Re: [XOM-interest] How to make the object of nu.xom.Document may toserialize ?
  • Date: Mon, 10 Dec 2007 20:01:36 +0000

On Dec 10, 2007 7:25 PM, Tatu Saloranta <cowtowncoder AT> wrote:
> --- Steve Loughran <steve.loughran AT> wrote:
> > On Dec 10, 2007 1:40 AM, Tatu Saloranta
> > <cowtowncoder AT> wrote:
> > > While this is certainly possible, the question is,
> why
> > > bother? Serialization to textual xml can be done
> ...
> > I'm not going to defend Java Serialisation overhead,
> ...
> > But there are a lot of places where it gets used,
> such as saving
> > session state in an app server, or chatting between
> processes in
> > EJB-land. Sometimes the things you send over dont
> ...
> Ah ok. Yes, this does make sense -- so sometimes it
> would be
> convenient (and even necessary) to be able to
> serialize xom
> documents and/or nodes. So basically it'd be for
> inter-operability reasons.

Exactly. And you can do it with a wrapper class, which is what you add
to the serialisation package:

the document is marked as transient, and it implements the special
private methods needed to serialize/deserialize a document, so
marshalling it over RMI or similar. My design delegates serialisation
to a plug in codecl you could support the nux form fairly easily:


Archive powered by MHonArc 2.6.24.

Top of Page