Most visited

Recently visited

Added in API level 8

SAXResult

public class SAXResult
extends Object implements Result

java.lang.Object
   ↳ javax.xml.transform.sax.SAXResult


充当转型结果的持有者。

Summary

Constants

String FEATURE

如果 getFeature(String)在将此值作为参数传递时返回true,则Transformer支持此类型的Result输出。

Inherited constants

From interface javax.xml.transform.Result

Public constructors

SAXResult()

零参数默认构造函数。

SAXResult(ContentHandler handler)

创建一个以SAX2 ContentHandler目标的 ContentHandler

Public methods

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关联使用的 ContentHandler

Inherited methods

From class java.lang.Object
From interface javax.xml.transform.Result

Constants

FEATURE

Added in API level 8
String FEATURE

如果 getFeature(String)在将此值作为参数传递时返回true,则Transformer支持此类型的Result输出。

常量值:“http://javax.xml.transform.sax.SAXResult/feature”

Public constructors

SAXResult

Added in API level 8
SAXResult ()

零参数默认构造函数。

SAXResult

Added in API level 8
SAXResult (ContentHandler handler)

创建一个以SAX2 ContentHandler目标的 ContentHandler

Parameters
handler ContentHandler: Must be a non-null ContentHandler reference.

Public methods

getHandler

Added in API level 8
ContentHandler getHandler ()

获取结果的 ContentHandler

Returns
ContentHandler The ContentHandler that is to be transformation output.

getLexicalHandler

Added in API level 8
LexicalHandler getLexicalHandler ()

获取输出的SAX2 LexicalHandler

Returns
LexicalHandler A LexicalHandler, or null.

getSystemId

Added in API level 8
String getSystemId ()

获取使用setSystemId设置的系统标识符。

Returns
String The system identifier that was set with setSystemId, or null if setSystemId was not called.

setHandler

Added in API level 8
void setHandler (ContentHandler handler)

将目标设置为SAX2 ContentHandler

Parameters
handler ContentHandler: Must be a non-null ContentHandler reference.

setLexicalHandler

Added in API level 8
void setLexicalHandler (LexicalHandler handler)

为输出设置SAX2 LexicalHandler

这是处理XML注释等所需要的。 如果没有设置词汇处理程序,则应由变压器尝试将ContentHandler转换为LexicalHandler

Parameters
handler LexicalHandler: A non-null LexicalHandler for handling lexical parse events.

setSystemId

Added in API level 8
void setSystemId (String systemId)

方法setSystemId设置可与 ContentHandler关联使用的 ContentHandler

Parameters
systemId String: The system identifier as a URI string.

Hooray!