javax.xml.stream
Interface XMLResolver


public interface XMLResolver

This interface is used to resolve resources during an XML parse. If an application wishes to perform custom entity resolution it must register an instance of this interface with the XMLInputFactory using the setXMLResolver method. The order of precedence is as follows: 1. resolveAsXMLStreamReader(...) 2. resolveAsXMLEventReader(...) 3. resolve(...) if (1) returns null (2) will be called, if (2) returns null (3) will be called, if this returns null the processor will attempt to resolve the entity using its default mechanism.


Method Summary
 java.io.InputStream resolve(java.lang.String uri)
          Retrieves a resource from the specified uri
 XMLEventReader resolveAsXMLEventReader(java.lang.String uri)
          Retrieves a resource from the specified uri
 XMLStreamReader resolveAsXMLStreamReader(java.lang.String uri)
          Retrieves a resource from the specified uri
 

Method Detail

resolveAsXMLEventReader

public XMLEventReader resolveAsXMLEventReader(java.lang.String uri)
                                       throws XMLStreamException
Retrieves a resource from the specified uri

Parameters:
uri - the uri of the resource to resolve
Returns:
an XMLEventReader over the resource or null
Throws:
XMLStreamException

resolveAsXMLStreamReader

public XMLStreamReader resolveAsXMLStreamReader(java.lang.String uri)
                                         throws XMLStreamException
Retrieves a resource from the specified uri

Parameters:
uri - the uri of the resource to resolve
Returns:
an XMLStreamReader over the resource or null
Throws:
XMLStreamException

resolve

public java.io.InputStream resolve(java.lang.String uri)
                            throws XMLStreamException
Retrieves a resource from the specified uri

Parameters:
uri - the uri of the resource to resolve
Returns:
an InputStream of the resource or null
Throws:
XMLStreamException