Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] best way to bind java classes to xom classes?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "John.Cowan" <jcowan AT reutershealth.com>
  • To: Steve Loughran <steve.loughran AT gmail.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] best way to bind java classes to xom classes?
  • Date: Fri, 17 Jun 2005 08:41:05 -0400

Steve Loughran scripsit:

> It seems to me, that a more effective solution would be trivial were
> every Xom node to have an Object data; element at the end that would
> let me store a back pointer. The alternative would be to hide a back
> pointer inside a attribute (@impl:owner="0xfeedf00d" , but that not
> only alters the document, it is hard to do in Java, given that
> pointers are hidden.

This is precisely why you are allowed to subclass Element and the other
node classes (to hold application-specific information) and make your
own subclass of Builder to create and return them. The rest of the
system won't know you are using subclasses, but you will, and you can
avoid creating a parallel tree.

Elliotte, you really need to write a tutorial explaining all this.


--
Your worships will perhaps be thinking John Cowan
that it is an easy thing to blow up a dog? http:/www.reutershealth.com
[Or] to write a book? http://www.ccil.org/~cowan
--Don Quixote, Introduction jcowan AT reutershealth.com




Archive powered by MHonArc 2.6.24.

Top of Page