[xml] caching of parsed DTDs ?



Hi List,

sorry, if this is a FAQ (although I wasn't able to find info about this in
the web sites FAQ or mailing list archive, but maybe I haven't looked at
the right places).

I am using libxml2-2.4.28, running on Debian GNU/Linux 2.2 (kernel version
2.4.18).

My application is using libxml to parse and validate XML-documents, which
most of the time use the same DTD. To speed up computation I am thinking
about implementing a caching mechanism for DTDs. So, if a document using
DTD "test.dtd" gets parsed, I want to retrieve the xmlDTDPtr for
further validation of documents using the same DTD without actually
parsing the DTD again (the validity of a DTD is ensured to stay ok during
the lifetime of the process).

What I am wondering about if this functionality is already implemented in
libxml2, or do DTDs get parsed every time a document references it as the
corresponding DTD ?

I am sorry for not finding the information by myself in the libxml2-code,
I peeked around the sources but wasn't able to find a confirmative answer.

Thanks for your help,
Robert



---
GPG: gpg --keyserver wwwkeys.pgp.net --recv-keys CCFDEB89




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]