commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: DOM-based Digester?
Date Fri, 11 Oct 2002 23:37:23 GMT

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:commons-dev-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>>so
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>

--
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:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message