[jdom-interest] [Fwd: JDOM ?]

Alex Rosen arosen at silverstream.com
Tue Mar 12 07:39:47 PST 2002

If we're sure that all parser support being reused (or are supposed to
support it), then it does seem like a good idea. Doing a quick search, I
found that the original (i.e. very old) IBM4J parser says this about its
parsing methods: "Once this method is invoked, the parser instance is of no
further use, and should NOT be reused." I don't know about newer parsers.
The JAXP spec doesn't say one way or the other...



> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Dennis Sosnoski
> Sent: Monday, March 11, 2002 9:08 PM
> To: Jason Hunter
> Cc: JDOM Interest; K.Gillies
> Subject: Re: [jdom-interest] [Fwd: JDOM ?]
> You can subclass SAXBuilder and override the createParser
> method to only
> create a parser the first time through. That's probably the simplest
> solution to get reusability (though I haven't looked into
> whether there
> might be other issues).
> It seems like this is a reasonable thing for SAXBuilder to do by
> default, though. Is there any reason you'd want the code to
> always build
> a new parser? I can't think of any.
>   - Dennis

More information about the jdom-interest mailing list