XMLResolver (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


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.

版本:
1.0
作者:
Copyright (c) 2003 by BEA Systems. All Rights Reserved.

方法摘要
 Object resolveEntity(String publicID, String systemID, String baseURI, String namespace)
          Retrieves a resource.
 

方法详细信息

resolveEntity

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.

参数:
publicID - The public identifier of the external entity being referenced, or null if none was supplied.
systemID - The system identifier of the external entity being referenced.
baseURI - Absolute base URI associated with systemId.
namespace - The namespace of the entity to resolve.
返回:
The resource requested or null.
抛出异常:
XMLStreamException - if there was a failure attempting to resolve the resource.

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.