public class SAXResult extends Object implements Result
Acts as an holder for a transformation Result.
Modifier and Type | Field and Description |
---|---|
static String |
FEATURE
If
TransformerFactory.getFeature(java.lang.String)
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 handler)
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 handler)
Set the target to be a SAX2
ContentHandler . |
void |
setLexicalHandler(LexicalHandler handler)
Set the SAX2
LexicalHandler for the output. |
void |
setSystemId(String systemId)
Method setSystemId Set the systemID that may be used in association
with the
ContentHandler . |
public static final String FEATURE
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(ContentHandler handler)
ContentHandler
.handler
- Must be a non-null ContentHandler reference.public void setHandler(ContentHandler handler)
ContentHandler
.handler
- Must be a non-null ContentHandler reference.public ContentHandler getHandler()
ContentHandler
that is the Result.public void setLexicalHandler(LexicalHandler handler)
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 LexicalHandler getLexicalHandler()
LexicalHandler
for the output.LexicalHandler
, or null.public void setSystemId(String systemId)
ContentHandler
.setSystemId
in interface Result
systemId
- The system identifier as a URI string.public String getSystemId()
getSystemId
in interface 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, 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.