TransformerHandler
Stay organized with collections
Save and categorize content based on your preferences.
A TransformerHandler
listens for SAX ContentHandler parse events and transforms
them to a Result.
Public Method Summary
abstract
String
|
getSystemId()
Get the base ID (URI or system ID) from where relative
URLs will be resolved.
|
abstract
Transformer
|
getTransformer()
Get the Transformer associated with this handler, which
is needed in order to set parameters and output properties.
|
abstract
void
|
setResult( Result result)
Set the Result associated with this
TransformerHandler to be used for the transformation.
|
abstract
void
|
setSystemId( String systemID)
Set the base ID (URI or system ID) from where relative
URLs will be resolved.
|
Inherited Method Summary
From interface
org.xml.sax.ContentHandler
abstract
void
|
characters(char[] ch, int start, int length)
Receive notification of character data.
|
abstract
void
|
endDocument()
Receive notification of the end of a document.
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
ignorableWhitespace(char[] ch, int start, int length)
Receive notification of ignorable whitespace in element content.
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
startDocument()
Receive notification of the beginning of a document.
|
abstract
void
|
|
abstract
void
|
|
From interface
org.xml.sax.ext.LexicalHandler
abstract
void
|
comment(char[] ch, int start, int length)
Report an XML comment anywhere in the document.
|
abstract
void
|
endCDATA()
Report the end of a CDATA section.
|
abstract
void
|
endDTD()
Report the end of DTD declarations.
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
startEntity( String name)
Report the beginning of some internal and external XML entities.
|
Public Methods
public
abstract
String
getSystemId
()
Get the base ID (URI or system ID) from where relative
URLs will be resolved.
Get the Transformer
associated with this handler, which
is needed in order to set parameters and output properties.
Returns
Transformer
associated with this
TransformerHandler
.
public
abstract
void
setResult
(Result result)
Set the Result
associated with this
TransformerHandler
to be used for the transformation.
Parameters
result |
A Result instance, should not be
null . |
public
abstract
void
setSystemId
(String systemID)
Set the base ID (URI or system ID) from where relative
URLs will be resolved.
Parameters
systemID |
Base URI for the source tree.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-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 2024-07-10 UTC."],[[["`TransformerHandler` listens for SAX ContentHandler parse events and transforms them into a `Result` object."],["It provides methods to set and retrieve the base system ID for resolving relative URLs during the transformation."],["Users can access the associated `Transformer` object to configure parameters and output properties."],["A `Result` object, specifying the transformation output destination, can be set using the `setResult` method."]]],["The `TransformerHandler` interface listens for SAX parse events and transforms them into a `Result`. Key actions include setting and getting the base system ID for resolving relative URLs via `setSystemId` and `getSystemId`, respectively. It also involves setting the transformation `Result` using `setResult` and retrieving the associated `Transformer` via `getTransformer`, which is used to configure parameters and output. The interface handles content, lexical, and DTD events.\n"]]