[reportlab-users] pyRXP: caching DTD

Peter Slickers reportlab-users@reportlab.com
Wed, 10 Sep 2003 18:51:23 +0200


I want to read through about 100 XML files all of them
conforming to the same DTD. So I instanciate one pyRXP.Parser
object, and use this object to parse every XML file.
Now it turns out, that the DTD (which is spread over three
files in this case) is read every time a pass a new
string to the parser.

Is there any way to read/parse the DTD just once
and then store the result in the pyRXP.Parser
object?

In my case, the performance of the XML parser
drops by about 30%, if I enable reading of the DTD.
I guess that this is mainly caused by reading the
DTD files again and again from the hard disk.
-- 


Peter
-------------------------------------------------------------------
Peter Slickers                             piet@clondiag.com
Clondiag Chip Technologies                 http://www.clondiag.com/
Löbstedter Str. 105
07749 Jena
Germany

Fon:  03641/5947-65                        Fax:  03641/5947-20
-------------------------------------------------------------------