Hi,
thanks for the reply. So if I want to have concurrent access to the 
DOM, I guess one way to do it will be to disable the Deferred 
feature. The way to do it is clearly described in the Xerces docs, 
but it advices developers to use xerces's DOMParser class. Is it 
not possible to use the DocumentBuilderFactory.setAttribute to 
make it more impl. independent?

Cheers,
Herry

On 10 May 2002, at 10:13, Elena Litani wrote:

> Herry Koh wrote:
> > apologies if I didn't make myself clear the last mail.
> > By 'access' I mean just to *read* the leaf nodes of the DOM tree. In
> > this scenario, I believe there is no need for thread safety. 
> 
> Your assumption is incorrect. DOM is just a set of interfaces and
> interfaces do not define how the DOM should be implemented. For example,
> Xerces Deferred DOM is a compact sturucture that deferres creating nodes
> untill you acces (read) those. At the time you acces a node the
> appropriate DOM nodes are created and the deferred structure is cleared
> (that explains why you are getting "null").
> 
> Since you have no way of knowing the actual implementation, you must
> always synchronize access (read or write) to the DOM tree.
> 
> -- 
> Elena Litani / IBM Toronto
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to