One way to avoid these problems is to use an entity resolver (a standard part of SAX) or a URI Resolver (a standard part of JAXP).
•
The following example shows how, in Java, a SAX parser may be created to parse some input source in which the org.apache.xml.resolver.tools.CatalogResolver is used to resolve external entities to locally-cached instances.
XML | Catalog numbering systems for single records | XML Schema (W3C) | XML Schema | Simple API for XML | XML schema | XML Information Set | Plain Old XML | XML database | XML validation | XML User Interface | XML Resource | XML Professional Publisher | XML namespace | XML Database | XML-binary Optimized Packaging | .XML | .xml | Whole Internet User's Guide and Catalog | Whole Earth Catalog | Union Catalog | Union catalog | SQL/XML | Open XML Paper Specification | Online catalog | National Union Catalog | Gum catalog | Astronomical catalog | Aresti Catalog |