> I've run up against this problem as well.  If I'm not mistaken, the
> problem is the way Xerces handles setting properties on a DOM parser
> via the JAXP interfaces.  Xerces will create a new instance (!) of the
> DOMParser class for every single property you set (i.e., via
> setValidating(), setNamespaceAware(), etc.).  This wouldn't be so bad
> if it wasn't so expensive to create a DOMParser instance, but it is.
> You should really be timing the parse and not the setup and parse.
>
> I was sort of shocked when I first discovered how poorly Xerces
> handles setting JAXP DocumentBuilder properties, but from
> conversations on this mailing list it's obviously a known problem and
> there doesn't seem to be much that can be done about it.  Shrug.

Hello Curtis,

What I didn't mention: I'm reusing the DocumentBuilder and this gives me only 
a small speedup. What I'm timing is the parsing itself, not the creation of 
the DocumentBuilder. Even if creating the DocumentBuilder was really slow, it 
wouldn't really be a problem because I'm using it in a Bean and it's only 
created once per Bean.

Cheers, Jos

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

Reply via email to