XMLBeans External Entity Resolver

This page is a mini spec on how to resolve external entities.

Support for using a class that implements org.xml.sax.EntityResolver interface in two places: - when parsing regular XML documents that contain references to external entities

- when parsing XMLSchema documents or WSDL documents that contain imports or includes

How to set the resolver

1. Use XmlOptions.setEntityResolver(EntityResolver resolver) to pass in the resolver to be used for parsing XML documents  XmlObject.parse(...)  or compiling XMLSchema or WSDL documents  SchemaTypeSystemCompiler.compile(...) 

2. If no entity resolver has been set in XmlOptions, org.apache.xml.resolver.tools.CatalogResolver will be used as a resolver if Apache's XmlCommons resolver.jar is on the classpath and a catalog file has been specified.

3. If the previous conditions failed, the xmlbean.entityResolver system property will specify the name of a global, read only resolver.

4. If all previous attempts failed, the resolver will be at the discretion of the used XML parser for XML documents and for XMLSchema and WSDL documents a simple resolver implementation will be used if

is used.

ExternalEntityResolver (last edited 2011-12-19 22:14:32 by c-98-195-211-55)