You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/06/29 03:24:12 UTC

DO NOT REPLY [Bug 29838] - strange Digester parsing error

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29838>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29838

strange Digester parsing error





------- Additional Comments From simon@ecnetwork.co.nz  2004-06-29 01:24 -------
It does indeed sound like a strange problem, and one that will be very difficult
to diagnose unless you can provide code which can demonstrate the problem.

Are you using the same Digester instance to parse multiple input files, or are
you creating a new Digester instance each time? I would recommend *against*
trying to reuse a digester object. 

If you are concerned about performance then you might want to create a RulesBase
object, add rule instances to it, then reuse that object but create a separate
Digester object each time. The reason is that the Digester object's main purpose
is to maintain state during SAX event-based parsing. When this is rudely
interrupted by an exception, the state may get a bit messy, preventing a clean
reset before the next parse. The Rule and RulesBase classes, on the other hand,
are not supposed to be modified by the parsing, ie are "stateless" with respect
to the sax parsing stage and so are pretty safe to reuse.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org