Class SecureXmlFactories

java.lang.Object
org.tailormap.api.util.SecureXmlFactories

public final class SecureXmlFactories extends Object
Factories for parsing XML hardened against XXE, for XML from external sources such as responses of OGC services. Use these instead of the JAXP newInstance() methods, enforced by the PMD rule UseSecureXmlFactories.

Only the JDK XML implementations are on the classpath, so no implementation-specific hardening is needed. A DOCTYPE is allowed because OGC responses can have one (WMS 1.1.1 exception reports usually do), but the external DTD and external entities are never loaded.