public class SAXResult extends Objectimplements Result
Acts as an holder for a transformation Result.
| Modifier and Type | Field and Description |
|---|---|
static String |
FEATURE
If
TransformerFactory returns true when passed this value as an argument, the Transformer supports Result output of this type.
|
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Constructor and Description |
|---|
SAXResult()
Zero-argument default constructor.
|
SAXResult(ContentHandler
Create a SAXResult that targets a SAX2
ContentHandler.
|
| Modifier and Type | Method and Description |
|---|---|
ContentHandler |
getHandler()
Get the
ContentHandler that is the Result.
|
LexicalHandler |
getLexicalHandler()
Get a SAX2
LexicalHandler for the output.
|
String |
getSystemId()
Get the system identifier that was set with setSystemId.
|
void |
setHandler(ContentHandler
Set the target to be a SAX2
ContentHandler.
|
void |
setLexicalHandler(LexicalHandler
Set the SAX2
LexicalHandler for the output.
|
void |
setSystemId(String
Method setSystemId Set the systemID that may be used in association with the
ContentHandler.
|
public static final StringFEATURE
TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Result output of this type.
public SAXResult()
public SAXResult(ContentHandlerhandler)
ContentHandler.
handler - Must be a non-null ContentHandler reference.
public void setHandler(ContentHandlerhandler)
ContentHandler.
handler - Must be a non-null ContentHandler reference.
public ContentHandlergetHandler()
ContentHandler that is the Result.
public void setLexicalHandler(LexicalHandlerhandler)
LexicalHandler for the output.
This is needed to handle XML comments and the like. If the lexical handler is not set, an attempt should be made by the transformer to cast the ContentHandler to a LexicalHandler.
handler - A non-null
LexicalHandler for handling lexical parse events.
public LexicalHandlergetLexicalHandler()
LexicalHandler for the output.
LexicalHandler, or null.
public void setSystemId(StringsystemId)
ContentHandler.
setSystemId in interface
Result
systemId - The system identifier as a URI string.
public StringgetSystemId()
getSystemId in interface
Result