[Biojava-l] Re: unexpected behavior in StAX, StringElementHandlerBase

Thomas Down td2@sanger.ac.uk
Tue, 18 Sep 2001 20:49:23 +0100


On Tue, Sep 18, 2001 at 10:39:14AM -0700, Christopher Pickslay wrote:
> 
> As to how to treat child elements, I'd recommend having 
> StringElementHandlerBase throw an exception (as it currently does). But it 
> would be a good idea to add a MixedElementHandlerBase class which allows 
> for the retrieval of character data and allows the implementor to handle 
> delegation for child elements.

That sounds a good idea.

Actually, the alternative would be to have two extra protected
methods on StringElementHandlerBase: say, startChildElement
and endChildElement.  By default, these just throw an exception,
but they can be over-ridden if you know what you're doing.

Same sort of idea, but avoids the extra class.

How does this sound?

   Thomas.