|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.stream Interface XMLResolver
public interface XMLResolver
此接口用于在 XML 解析过程中解析资源。如果应用程序希望执行自定义实体解析,那么它必须使用 setXMLResolver 方法向 XMLInputFactory 注册此接口的一个实例。
version | 1.0 |
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.
- Version:
- 1.0
- Author:
- Copyright (c) 2003 by BEA Systems. All Rights Reserved.
Method Summary | |
---|---|
Object |
resolveEntity(String publicID,
String systemID,
String baseURI,
String namespace)
Retrieves a resource. |
Method Detail |
---|
public Object
resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException
检索资源。此资源可以是下列三种返回类型之一:(1) java.io.InputStream (2) javax.xml.stream.XMLStreamReader (3) java.xml.stream.XMLEventReader。如果此方法返回 null,则处理器将尝试用其默认机制解析实体。
publicID | 被引用的外部实体的公共标识符,如果未提供此类标识符,则该参数为 null。 |
systemID | 被引用外部实体的系统标识符。 |
baseURI | 与 systemId 关联的绝对基本 URI。 |
namespace | 要解析的实体名称空间。 |
return | 请求的资源或 null。 |
Throws | XMLStreamException: 如果尝试解析资源时出现错误。 |
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.
- Parameters:
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.- Returns:
- The resource requested or null.
- Throws:
XMLStreamException
- if there was a failure attempting to resolve the resource.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!