Caching Entity Resolver

Both SAX and DOM parsers attempt to download document type definitions everytime they are encountered. The caching entity resolver stores them in a local repository and answers all further requests directly from the repository.

Get it while it’s hot: CachingEntityResolver.java

See also the XML Validator and the Null Entity Resolver