<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
You're not alone. We had the same idea and actually implemented interfaces, specialist JDOM factories and specialist JDOM nodes to support this (including event notification up the DOM hierarchy). Sadly, due to a small number of issues within JDOM itself we have had to patch the original JDOM code to enable correct event handling (specifically wrt insertion and deletion of nodes). The other problem we face is that we have to have a certain amount of "inside knowledge" of the JDOM classes in order to achieve this. This has meant that we're now "stuck" on JDOM Beta 9 (Beta 10's implementation was radically altered by the introduction of the Parent and Child interfaces - IMHO a common "Node" interface would have been far more useful, allowing the removal of "Object" from JDOM's API in most cases).<BR>
It would be fantastic if JDOM itself had this support, but I doubt if you'll ever see it given previous discussions on this topic.<BR>
On Tue, 2004-09-07 at 03:59, Ravi Bhatia wrote:
Greetings. I was wondering if the JDOM library could support events. This is
useful in the Model-View-Controller paradigm, when an XML document is used to
represent the core data model. If a org.jdom.Document object could fire events
when it changes, a Listener that has registered with it could be notified.
Hence, allowing a View to reflect these changes immediately.
I believe, by using events, changes in the underlying XML document could be
propagated in a simpler and cleaner fashion.
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
Phil Weighill-Smith <<A HREF="mailto:firstname.lastname@example.org"><U>email@example.com</U></A>><BR>