For testing purposes, what you might like to do is create an EntityResolver that will resolve the remote DTD to a locally held file or resource. The resolver should be set on the XMLReader. This maintains DTD validation but allows you to do it "locally" rather than by fetching the DTD from a remote location.

Phil :n.

PS: Clearly you would have to copy the DTD, and any other supporting files, off the web to provide them locally.

On Mon, 2005-02-14 at 12:48, Jos van den Oever wrote:
On Monday 14 February 2005 13:44, Rick Bullotta wrote:
> First of all, I would place those setProperty calls in a static initializer
> so you don't call them each time.  Also, realize that it will always take
> some time the first time you create a factory and/or builder.
>
> If you run your test "n" times, you should find it much faster on average
> with the system properties set.

Hello Rick,

Yes, I'm actually running the parse 5 times and each time is slightly faster.

However, removing the <!DOCTYPE really speeds things up. Now parsing (after 
creating the Builder) takes anywhere between 6 and 2 ms. So the DOCTYPE is 
really slowing things down. Unfortunately, I can't remove it from the xhtml 
file, because it would be invalid without it.

Is there a function to turn of DOCTYPE interpretation?

Cheers, Jos

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Phil Weighill-Smith <[EMAIL PROTECTED]>
Volantis Systems

Reply via email to