Package org.xmlresolver
The resolver maps external identifiers (document type declarations and external parsed entities) and URIs found in XML documents to other resources. This implementation supports additional interfaces to perform redirection through RDDL documents and automated caching of resources retrieved from the web.
TL;DR
Instantiate an XMLResolver
(it has a zero argument constructor
so that it can be instantiated just from its name). Use the methods provided on the XMLResolver
to instantiate the resolver interfaces that you require.
Tell your processor to instantiate a
ResolvingXMLReader
for parsing.
L;OS (long; only skimmed)
For most users, the principle entry points to this API will be the
XMLResolver
class and the ResolvingXMLReader
. These instantiate
a resolver that can be configured with either system properties or
a properties file.
The XMLResolver
has methods to construct a wide variety of resolver interfaces:
javax.xml.transform.URIResolver
XMLResolver.getURIResolver()
.org.w3c.dom.ls.LSResourceResolver
XMLResolver.getLSResourceResolver()
.org.xml.sax.EntityResolver
XMLResolver.getEntityResolver()
.org.xml.sax.ext.EntityResolver2
XMLResolver.getEntityResolver2()
.XMLResolver
XMLResolver.getXMLResolver()
The ResolvingXMLReader
class extends the SAX parser so that
it will automatically construct and use a resolver.
Accessing the resolver
The resolver is configured with a ResolverConfiguration
, more specifically
in this release, an XMLResolverConfiguration
. This class allows you to configure
features of the resolver.
-
Interface Summary Interface Description ResolverConfiguration Interface for configuring the resolver.XMLCatalogResolver The Catalog resolver interface. -
Class Summary Class Description CatalogManager TheCatalogManager
manages a list of OASIS XML Catalogs and performs lookup operations on those catalogs.CatalogResolver Deprecated. 6.0.0ResolvedResource Deprecated. 6.0.0Resolver Deprecated. 6.0.0ResolverConstants A collection of constants.ResolverFeature<T> An individual resolver feature.ResourceAccess Static methods for accessing resources.ResourceRequest A resource request.ResourceResponse AResourceResponse
is the return type for either an attempt to lookup a resource in the catalog or to resolve a resource.XMLResolver The XML Resolver.XMLResolverConfiguration Configures an XML resolver.