public class SAXResult extends Object implements Result
作为转型结果的持有人。
| Modifier and Type | Field and Description |
|---|---|
static String |
FEATURE
如果
TransformerFactory.getFeature(java.lang.String)将该值作为参数传递时返回true,则Transformer将支持此类型的Result输出。
|
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Constructor and Description |
|---|
SAXResult()
零参数默认构造函数。
|
SAXResult(ContentHandler handler)
创建一个针对SAX2 ContentHandler的SAXResult 。
|
| Modifier and Type | Method and Description |
|---|---|
ContentHandler |
getHandler()
获取结果的 ContentHandler 。
|
LexicalHandler |
getLexicalHandler()
获取SAX2 LexicalHandler作为输出。
|
String |
getSystemId()
获取使用setSystemId设置的系统标识符。
|
void |
setHandler(ContentHandler handler)
将目标设定为SAX2 ContentHandler 。
|
void |
setLexicalHandler(LexicalHandler handler)
设置SAX2 LexicalHandler作为输出。
|
void |
setSystemId(String systemId)
方法setSystemId设置可能与 ContentHandler关联使用的systemID 。
|
public static final String FEATURE
TransformerFactory.getFeature(java.lang.String)作为参数传递此值时返回true,则Transformer将支持此类型的Result输出。
public SAXResult()
public SAXResult(ContentHandler handler)
ContentHandler的SAXResult 。
handler - 必须是非空的ContentHandler引用。
public void setHandler(ContentHandler handler)
ContentHandler 。
handler - 必须是非空的ContentHandler引用。
public ContentHandler getHandler()
ContentHandler 。
public void setLexicalHandler(LexicalHandler handler)
LexicalHandler 。
这是处理XML注释等需要的。 如果未设置词法处理程序,应尝试由变压器铸制成ContentHandler到LexicalHandler 。
handler - 用于处理词法解析事件的非空
LexicalHandler 。
public LexicalHandler getLexicalHandler()
LexicalHandler作为输出。
LexicalHandler ,或null。
public void setSystemId(String systemId)
ContentHandler关联使用的systemID 。
setSystemId在接口
Result
systemId - 系统标识符作为URI字符串。
public String getSystemId()
getSystemId在界面
Result
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.