public class DelegatingEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver
EntityResolver
implementation that delegates to a BeansDtdResolver
and a PluggableSchemaResolver
for DTDs and XML schemas, respectively.BeansDtdResolver
,
PluggableSchemaResolver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DTD_SUFFIX
Suffix for DTD files.
|
static java.lang.String |
XSD_SUFFIX
Suffix for schema definition files.
|
Constructor and Description |
---|
DelegatingEntityResolver(java.lang.ClassLoader classLoader)
Create a new DelegatingEntityResolver that delegates to
a default
BeansDtdResolver and a default PluggableSchemaResolver . |
DelegatingEntityResolver(org.xml.sax.EntityResolver dtdResolver,
org.xml.sax.EntityResolver schemaResolver)
Create a new DelegatingEntityResolver that delegates to
the given
EntityResolvers . |
Modifier and Type | Method and Description |
---|---|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId) |
java.lang.String |
toString() |
public static final java.lang.String DTD_SUFFIX
public static final java.lang.String XSD_SUFFIX
public DelegatingEntityResolver(@Nullable java.lang.ClassLoader classLoader)
BeansDtdResolver
and a default PluggableSchemaResolver
.
Configures the PluggableSchemaResolver
with the supplied
ClassLoader
.
classLoader
- the ClassLoader to use for loading
(can be null
) to use the default ClassLoader)public DelegatingEntityResolver(org.xml.sax.EntityResolver dtdResolver, org.xml.sax.EntityResolver schemaResolver)
EntityResolvers
.dtdResolver
- the EntityResolver to resolve DTDs withschemaResolver
- the EntityResolver to resolve XML schemas with@Nullable public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, @Nullable java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
resolveEntity
in interface org.xml.sax.EntityResolver
org.xml.sax.SAXException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object