[jdom-interest] [off-topic] SaxPath?
    Laurent Bihanic 
    laurent.bihanic at atosorigin.com
       
    Tue Oct  2 06:50:42 PDT 2001
    
    
  
Attila Szegedi wrote:
> These methods would constrain traversing the object model in the same order as they appear in the XML stream - which is natural since the backend is SAX. The tricky part of this stuff is that it needs to be implemented as a two-threaded producer-consumer pattern (the SAX parser executes on a separate thread as a producer, while the object model acts as the consumer).
> 
Why do you want to use several threads? Controlling the SAX parser from the Iterator should be quite easy without requiring the need for a separate thread.
Opposite to yours, my approach was driven by the need to automatically 
dispatch the processing of different types of elements to separate handling 
classes, each of them capable of processing only one type of record. Hence the 
choice of an observer-like model.
Laurent
    
    
More information about the jdom-interest
mailing list