Package org.xmlresolver
Class StAXResolver
java.lang.Object
org.xmlresolver.StAXResolver
- All Implemented Interfaces:
XMLResolver
Implements the
XMLResolver
interface.
This class is distinct from theThis interface is used to resolve resources during an XML parse. If an application wishes to perform custom entity resolution it must register an instance of this interface with the
XMLInputFactory
using thesetXMLResolver
method.
Resolver
class because the resolveEntity
method
of the XMLResolver
interface isn't compatible with the EntityResolver2
method of the same name.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of StAXResolver.StAXResolver
(ResourceResolver resolver) Creates a new instance of a StAXResolver.StAXResolver
(XMLResolverConfiguration config) Creates a new instance of a StAXResolver. -
Method Summary
Modifier and TypeMethodDescriptionGet the configuration used by this resolver.resolveEntity
(String publicId, String systemId, String baseURI, String namespace) Implements theXMLResolver
interface.
-
Field Details
-
logger
-
-
Constructor Details
-
StAXResolver
public StAXResolver()Creates a new instance of StAXResolver. The default resolver is a new ResourceResolver that uses a static catalog shared by all threads. -
StAXResolver
Creates a new instance of a StAXResolver. Creates a resolver using a specific Catalog.- Parameters:
config
- The XML Resolver configuration to use.
-
StAXResolver
Creates a new instance of a StAXResolver. Creates a resolver using a specific underlying ResourceResolver.- Parameters:
resolver
- The resource resolver to use.
-
-
Method Details
-
getConfiguration
Get the configuration used by this resolver.- Returns:
- The catalog
-
resolveEntity
public Object resolveEntity(String publicId, String systemId, String baseURI, String namespace) throws XMLStreamException Implements theXMLResolver
interface.- Specified by:
resolveEntity
in interfaceXMLResolver
- Throws:
XMLStreamException
-