Hi Mats
I´ve studied the Javadocs and I was wondering what kind of support (or similiar) for the DOM2 Events the API has?
Is it possible to use event listeners on TargetNodes in the DOM4J so that for instance a change in an elements character data triggers an event which is handled by an eventlistener?
Or is there a similiar approach for eventbased handling?
Right now the event based notification is primarily used at parsing time to notify you as parts of a document gets constructed. This allows massive XML documents to be processed efficently in a kind of row by row manner, only keeping one row in memory at once.
 
We don't yet offer any event based APIs for editing XML....
What I´m trying to achieve is the XForms instance data as a DOM, this DOM is updated according to events which in turn can trigger other events.
Is this possible with the current design of the API. I would really like to use it since it some really nice features, ie, the XPath support, Ruleengine..
This is one is currently on the drawing board. We want to be able to work nicely with XForms for building web apps too.
 
I'd like the support of listeners to be optional, so that parsing and modifying XML structures doesn't take the performance hit of having Lists of listeners all over the place.
 
So I'd like some kind of mechansim which has no cost if you don't use it but is pretty fast if you do. So I'm thinking that the Document could be the thing that you listen to for events that occur in the tree and the Elements notify the parent Document on changes.
 
So something analagous to DOM2's 'Events' will probably be added to dom4j really soon (by all means dive in if you want to help do it ;-)
 
James
 

Reply via email to