[jdom-interest] Events for JDOM

Sébastien Pierre spierre at isb-sib.ch
Mon Nov 19 00:36:16 PST 2001


> What I mean is that the JDOM API is sufficiently simple currently so 
> that the code is readable. Inserting the need to fire an event for any 
> mutation would make a huge code pollution which I really really don't 
> like.
>

Hi all,

I was also looking for a similar feature and found two possibilities:

  - Re-implement parts of the Element class. This has the advantage that 
you can optimize access to elements (in my case this means optimizing 
iteration on element content and direct modification of the lists 
instead of a setContent). You can also choose what you want to monitor 
and how.

  - Make a wrapper around the elements you want to monitor, in this case 
you can leave the JDom classes as is- the advantage is that if the 
wrapper is well done it can be used by others without having to be 
merged into the JDOM API.

Cheers,

  -- Sébastien.





More information about the jdom-interest mailing list