Chapter 4Using an XML Resolver

The simplest possible thing you can do is instantiate an instance of org.xmlresolver.Resolver and use it as the resolver for your parser. The Resolver class implements the following resolvers:

Another simple integration point is to instantiate as your XML parser.

1Programming with the resolver

If you want to take more complete programmatic control of the resolver, instantiate a resolver configuration:

  |XMLResolverConfiguration config
  |  = new XMLResolverConfiguration(propertyFiles, catalogs);

Set the features as you wish:

1 |config.setFeature(ResolverFeature.CACHE_UNDER_HOME, false);
  |if (validateCatalogs) {
  |    config.setFeature(ResolverFeature.CATALOG_LOADER_CLASS,
5 |                      "org.xmlresolver.loaders.ValidatingXmlLoader");

Then instantiate a resolver:

  |Resolver resolver = new Resolver(config);

and use that resolver in your parsing and URI retrieval.

For additional APIs, consult the JavaDoc.