Stay organized with collections
Save and categorize content based on your preferences.
Result
public
interface
Result
javax.xml.transform.Result
|
Known indirect subclasses
DOMResult |
Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.
|
SAXResult |
Acts as an holder for a transformation Result.
|
StreamResult |
Acts as an holder for a transformation result,
which may be XML, plain Text, HTML, or some other form of markup.
|
|
An object that implements this interface contains the information
needed to build a transformation result tree.
Summary
Constants |
String |
PI_DISABLE_OUTPUT_ESCAPING
The name of the processing instruction that is sent if the
result tree disables output escaping.
|
String |
PI_ENABLE_OUTPUT_ESCAPING
The name of the processing instruction that is sent
if the result tree enables output escaping at some point after having
received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
|
Public methods |
abstract
String
|
getSystemId()
Get the system identifier that was set with setSystemId.
|
abstract
void
|
setSystemId(String systemId)
Set the system identifier for this Result.
|
Constants
PI_DISABLE_OUTPUT_ESCAPING
public static final String PI_DISABLE_OUTPUT_ESCAPING
The name of the processing instruction that is sent if the
result tree disables output escaping.
Normally, result tree serialization escapes & and < (and
possibly other characters) when outputting text nodes.
This ensures that the output is well-formed XML. However,
it is sometimes convenient to be able to produce output that is
almost, but not quite well-formed XML; for example,
the output may include ill-formed sections that will
be transformed into well-formed XML by a subsequent non-XML aware
process. If a processing instruction is sent with this name,
serialization should be output without any escaping.
Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.
Constant Value:
"javax.xml.transform.disable-output-escaping"
PI_ENABLE_OUTPUT_ESCAPING
public static final String PI_ENABLE_OUTPUT_ESCAPING
The name of the processing instruction that is sent
if the result tree enables output escaping at some point after having
received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
Constant Value:
"javax.xml.transform.enable-output-escaping"
Public methods
getSystemId
public abstract String getSystemId ()
Get the system identifier that was set with setSystemId.
Returns |
String |
The system identifier that was set with setSystemId,
or null if setSystemId was not called. |
setSystemId
public abstract void setSystemId (String systemId)
Set the system identifier for this Result.
If the Result is not to be written to a file, the system identifier is optional.
The application may still want to provide one, however, for use in error messages
and warnings, or to resolve relative output identifiers.
Parameters |
systemId |
String : The system identifier as a URI string. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Result\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Methods](#pubmethods) \n\nResult\n======\n\n\n`\npublic\n\n\ninterface\nResult\n`\n\n\n`\n\n\n`\n\n|----------------------------|\n| javax.xml.transform.Result |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [DOMResult](/reference/javax/xml/transform/dom/DOMResult), [SAXResult](/reference/javax/xml/transform/sax/SAXResult), [StreamResult](/reference/javax/xml/transform/stream/StreamResult) |--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| | [DOMResult](/reference/javax/xml/transform/dom/DOMResult) | Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree. | | [SAXResult](/reference/javax/xml/transform/sax/SAXResult) | Acts as an holder for a transformation Result. | | [StreamResult](/reference/javax/xml/transform/stream/StreamResult) | Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\nAn object that implements this interface contains the information\nneeded to build a transformation result tree.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Constants ||\n|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](/reference/java/lang/String) | [PI_DISABLE_OUTPUT_ESCAPING](/reference/javax/xml/transform/Result#PI_DISABLE_OUTPUT_ESCAPING) The name of the processing instruction that is sent if the result tree disables output escaping. |\n| [String](/reference/java/lang/String) | [PI_ENABLE_OUTPUT_ESCAPING](/reference/javax/xml/transform/Result#PI_ENABLE_OUTPUT_ESCAPING) The name of the processing instruction that is sent if the result tree enables output escaping at some point after having received a PI_DISABLE_OUTPUT_ESCAPING processing instruction. |\n\n| ### Public methods ||\n|---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[String](/reference/java/lang/String) | ` `[getSystemId](/reference/javax/xml/transform/Result#getSystemId())`() ` Get the system identifier that was set with setSystemId. |\n| ` abstract void` | ` `[setSystemId](/reference/javax/xml/transform/Result#setSystemId(java.lang.String))`(`[String](/reference/java/lang/String)` systemId) ` Set the system identifier for this Result. |\n\nConstants\n---------\n\n### PI_DISABLE_OUTPUT_ESCAPING\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String PI_DISABLE_OUTPUT_ESCAPING\n```\n\nThe name of the processing instruction that is sent if the\nresult tree disables output escaping.\n\nNormally, result tree serialization escapes \\& and \\\u003c (and\npossibly other characters) when outputting text nodes.\nThis ensures that the output is well-formed XML. However,\nit is sometimes convenient to be able to produce output that is\nalmost, but not quite well-formed XML; for example,\nthe output may include ill-formed sections that will\nbe transformed into well-formed XML by a subsequent non-XML aware\nprocess. If a processing instruction is sent with this name,\nserialization should be output without any escaping.\n\nResult DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and\nPI_ENABLE_OUTPUT_ESCAPING inserted into the tree.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**See also:**\n\n- [disable-output-escaping in XSLT Specification](http://www.w3.org/TR/xslt#disable-output-escaping)\n\nConstant Value:\n\n\"javax.xml.transform.disable-output-escaping\"\n\n\n### PI_ENABLE_OUTPUT_ESCAPING\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String PI_ENABLE_OUTPUT_ESCAPING\n```\n\nThe name of the processing instruction that is sent\nif the result tree enables output escaping at some point after having\nreceived a PI_DISABLE_OUTPUT_ESCAPING processing instruction.\n\n\u003cbr /\u003e\n\n**See also:**\n\n- [disable-output-escaping in XSLT Specification](http://www.w3.org/TR/xslt#disable-output-escaping)\n\nConstant Value:\n\n\"javax.xml.transform.enable-output-escaping\"\n\n\nPublic methods\n--------------\n\n### getSystemId\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract String getSystemId ()\n```\n\nGet the system identifier that was set with setSystemId.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------|----------------------------------------------------------------------------------------------------|\n| [String](/reference/java/lang/String) | The system identifier that was set with setSystemId, or null if setSystemId was not called. \u003cbr /\u003e |\n\n### setSystemId\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void setSystemId (String systemId)\n```\n\nSet the system identifier for this Result.\n\nIf the Result is not to be written to a file, the system identifier is optional.\nThe application may still want to provide one, however, for use in error messages\nand warnings, or to resolve relative output identifiers.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------------------------------------------------|\n| `systemId` | `String`: The system identifier as a URI string. \u003cbr /\u003e |"]]