Elena Litani wrote:
1) See the DOM Level 3 "user data" feature; I believe Xerces has
prototyped that functionality.

Yes, and it works. Problem: During node creation, which usually is something like "configuration-" or "initialization-"time of the application, you can only rely to be notified, if you 1. subclassed the parser 2. Overwrote the parsers createElement method 3. Set the feature of deferred node creation to false...


The easiest approach is to register a DOMBuilderFilter [1] and in
*acceptNode* attach the user data.
Note that filter is called only for non-deferred node creation.



Hi Elena,

I am actually using this approach for attaching userdata. However the class org.apache.xerces.parsers.DOMParser does not have the methods getFilter and setFilter to actually register the filter. I had to subclass DOMParser and copy those two methods from DOMBuilderImpl. The functionality for DOMBuilderFilter itself is located in AbstractDOMParser. So I was just wondering why AbstractDOMParser does not provide those get/set methods.
Even if AbstractDOMParser may not provide all functionality to implement the BOMBuilder Interface (where get/setFilter is part of), still AbstractDOMParser could provide the two methods only.


-Arno


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to