Yes, this is precisely one of the advantages of DOM trees. You can easily 
deal with backward or forward references to other elements. Backward 
references are useful for lazy instantiation as you have mentioned.


At 15:56 11.10.2002 -0400, Jean-Francois Arcand wrote:
>One interesting uses is to create object "on demand", meaning not only 
>during the parsing of the file, but anytime you need to create an object 
>(you keep the DOM tree in memory). This mean you can applies more that one 
>object to the same set of rules without having to re-parse the file. You 
>just cache the dom tree in the Digester and re-use it when the parse 
>method is invoked.
>
>-- Jeanfrancois
>
>Ceki Gülcü wrote:
>
>>
>>At 00:37 12.10.2002 +0800, John Yu wrote:
>>
>>>At 12:21 am 12-10-2002, you wrote:
>>>
>>>>Has anyone thought of implementing Digester type functionality using 
>>>>the DOM API?
>>>
>>>
>>>Just curious: why does one need that?
>>
>>
>>Because rule based processing is useful regardless of whether SAX or DOM 
>>is being used. One objective advantage is that you can add new rules 
>>dynamically. You cannot do that with compiled Java.
>>
>>>--
>>>John Yu
>>
>>
>>--
>>Ceki
>>
>>TCP implementations will follow a general principle of robustness: be
>>conservative in what you do, be liberal in what you accept from
>>others. -- Jon Postel, RFC 793
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>so
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



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

Reply via email to