All Examples  XML Examples  This Package 

Class examples.xml.jms.ResourceEntityResolver

examples.xml.jms.ResourceEntityResolver

public class ResourceEntityResolver
This is a entity resolver which can be used with parsers to resolve XML external entities to local class resources. Use addEntityResource to add a mapping between a publicId and an external XML entity. The XML entity must be stored in the same directory as the associated resourceClass specified in the addEntityResource call.

Author:
Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.

Variable Index

 o entityCatalog
This contains mappings between XML public IDs and the local resources that they will map to.

Constructor Index

 o ResourceEntityResolver()

Method Index

 o addEntityResource(String, String, Class)
Specify a mapping between the publicId of an external XML entity and a local resource.
 o resolveEntity(String, String)
Resolve an entity passed to us by the XML parser.

Variables

 o entityCatalog
 protected Map entityCatalog
This contains mappings between XML public IDs and the local resources that they will map to.

Constructors

 o ResourceEntityResolver
 public ResourceEntityResolver()

Methods

 o resolveEntity
 public InputSource resolveEntity(String publicId,
                                  String systemId) throws SAXException, IOException
Resolve an entity passed to us by the XML parser. If the publicId of the entity is registered, we return null which signals the parser to use its default entity resolver.

 o addEntityResource
 public void addEntityResource(String publicId,
                               String resourceName,
                               Class resourceClass)
Specify a mapping between the publicId of an external XML entity and a local resource.


All Examples  XML Examples  This Package