APIdia Launch Partner
Top Description Methods
javax.xml.stream

public Interface XMLResolver

Known Direct Subinterfaces
javax.xml.catalog.CatalogResolver

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.
Author
Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
Since
1.6
Version
1.0

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The resource requested or null.
resolveEntity
(String
The public identifier of the external entity being referenced, or null if none was supplied.
publicID
,
String
The system identifier of the external entity being referenced.
systemID
,
String
Absolute base URI associated with systemId.
baseURI
,
String
The namespace of the entity to resolve.
namespace
)

Retrieves a resource.

Method Detail

resolveEntityback to summary
public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException

Retrieves a resource. This resource can be of the following three return types: (1) java.io.InputStream (2) javax.xml.stream.XMLStreamReader (3) java.xml.stream.XMLEventReader. If this method returns null the processor will attempt to resolve the entity using its default mechanism.

Parameters
publicID:String

The public identifier of the external entity being referenced, or null if none was supplied.

systemID:String

The system identifier of the external entity being referenced.

baseURI:String

Absolute base URI associated with systemId.

namespace:String

The namespace of the entity to resolve.

Returns:Object

The resource requested or null.

Exceptions
XMLStreamException:
if there was a failure attempting to resolve the resource.