KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > stream > XMLResolver


1 package javax.xml.stream;
2
3 /**
4  * This interface is used to resolve resources during an XML parse. If an application wishes to
5  * perform custom entity resolution it must register an instance of this interface with
6  * the XMLInputFactory using the setXMLResolver method.
7  *
8  * @version 1.0
9  * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
10  * @since 1.6
11  */

12 public interface XMLResolver {
13
14   /**
15    * Retrieves a resource. This resource can be of the following three return types:
16    * (1) java.io.InputStream (2) javax.xml.stream.XMLStreamReader (3) java.xml.stream.XMLEventReader.
17    * If this method returns null the processor will attempt to resolve the entity using its
18    * default mechanism.
19    *
20    * @param publicID The public identifier of the external entity being referenced, or null if none was supplied.
21    * @param systemID The system identifier of the external entity being referenced.
22    * @param baseURI Absolute base URI associated with systemId.
23    * @param namespace The namespace of the entity to resolve.
24    * @return The resource requested or null.
25    * @throws XMLStreamException if there was a failure attempting to resolve the resource.
26    */

27   public Object JavaDoc resolveEntity(String JavaDoc publicID,
28                               String JavaDoc systemID,
29                               String JavaDoc baseURI,
30                               String JavaDoc namespace)
31     throws XMLStreamException;
32 }
33
Popular Tags