Class DelegatingEntityResolver
java.lang.Object
org.springframework.beans.factory.xml.DelegatingEntityResolver
- All Implemented Interfaces:
EntityResolver
- Direct Known Subclasses:
ResourceEntityResolver
EntityResolver
implementation that delegates to a BeansDtdResolver
and a PluggableSchemaResolver
for DTDs and XML schemas, respectively.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller, Rick Evans
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDelegatingEntityResolver
(ClassLoader classLoader) Create a new DelegatingEntityResolver that delegates to a defaultBeansDtdResolver
and a defaultPluggableSchemaResolver
.DelegatingEntityResolver
(EntityResolver dtdResolver, EntityResolver schemaResolver) Create a new DelegatingEntityResolver that delegates to the givenEntityResolvers
. -
Method Summary
-
Field Details
-
DTD_SUFFIX
Suffix for DTD files.- See Also:
-
XSD_SUFFIX
Suffix for schema definition files.- See Also:
-
-
Constructor Details
-
DelegatingEntityResolver
Create a new DelegatingEntityResolver that delegates to a defaultBeansDtdResolver
and a defaultPluggableSchemaResolver
.Configures the
PluggableSchemaResolver
with the suppliedClassLoader
.- Parameters:
classLoader
- the ClassLoader to use for loading (can benull
) to use the default ClassLoader)
-
DelegatingEntityResolver
Create a new DelegatingEntityResolver that delegates to the givenEntityResolvers
.- Parameters:
dtdResolver
- the EntityResolver to resolve DTDs withschemaResolver
- the EntityResolver to resolve XML schemas with
-
-
Method Details
-
resolveEntity
@Nullable public InputSource resolveEntity(@Nullable String publicId, @Nullable String systemId) throws SAXException, IOException - Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
toString
-