javax.xml.transform
Stay organized with collections
Save and categorize content based on your preferences.
Interfaces
ErrorListener |
To provide customized error handling, implement this interface and
use the setErrorListener method to register an instance of the
implementation with the Transformer . |
Result |
An object that implements this interface contains the information
needed to build a transformation result tree. |
Source |
An object that implements this interface contains the information
needed to act as source input (XML source or transformation instructions). |
SourceLocator |
This interface is primarily for the purposes of reporting where
an error occurred in the XML source or transformation instructions. |
Templates |
An object that implements this interface is the runtime representation of processed
transformation instructions. |
URIResolver |
An object that implements this interface that can be called by the processor
to turn a URI used in document(), xsl:import, or xsl:include into a Source object. |
Classes
OutputKeys |
Provides string constants that can be used to set
output properties for a Transformer, or to retrieve
output properties from a Transformer or Templates object. |
Transformer |
An instance of this abstract class can transform a
source tree into a result tree. |
TransformerFactory |
A TransformerFactory instance can be used to create
Transformer and
Templates objects. |
Exceptions
Errors
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."],[[["\u003cp\u003eThe Java API for XML Processing (JAXP) provides interfaces like \u003ccode\u003eErrorListener\u003c/code\u003e, \u003ccode\u003eResult\u003c/code\u003e, \u003ccode\u003eSource\u003c/code\u003e, \u003ccode\u003eSourceLocator\u003c/code\u003e, \u003ccode\u003eTemplates\u003c/code\u003e, and \u003ccode\u003eURIResolver\u003c/code\u003e for handling errors, defining input/output, and managing transformation instructions.\u003c/p\u003e\n"],["\u003cp\u003eCore classes include \u003ccode\u003eOutputKeys\u003c/code\u003e for setting output properties, \u003ccode\u003eTransformer\u003c/code\u003e for executing transformations, and \u003ccode\u003eTransformerFactory\u003c/code\u003e for creating \u003ccode\u003eTransformer\u003c/code\u003e and \u003ccode\u003eTemplates\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eExceptions such as \u003ccode\u003eTransformerConfigurationException\u003c/code\u003e and \u003ccode\u003eTransformerException\u003c/code\u003e signal configuration problems or issues during the transformation process.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eTransformerFactoryConfigurationError\u003c/code\u003e is thrown when there's a fundamental configuration issue with the Transformer Factories.\u003c/p\u003e\n"]]],[],null,["Interfaces \n\n|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ErrorListener](../../../../reference/javax/xml/transform/ErrorListener.html) | To provide customized error handling, implement this interface and use the `setErrorListener` method to register an instance of the implementation with the [Transformer](../../../../reference/javax/xml/transform/Transformer.html). |\n| [Result](../../../../reference/javax/xml/transform/Result.html) | An object that implements this interface contains the information needed to build a transformation result tree. |\n| [Source](../../../../reference/javax/xml/transform/Source.html) | An object that implements this interface contains the information needed to act as source input (XML source or transformation instructions). |\n| [SourceLocator](../../../../reference/javax/xml/transform/SourceLocator.html) | This interface is primarily for the purposes of reporting where an error occurred in the XML source or transformation instructions. |\n| [Templates](../../../../reference/javax/xml/transform/Templates.html) | An object that implements this interface is the runtime representation of processed transformation instructions. |\n| [URIResolver](../../../../reference/javax/xml/transform/URIResolver.html) | An object that implements this interface that can be called by the processor to turn a URI used in document(), xsl:import, or xsl:include into a Source object. |\n\nClasses \n\n|-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [OutputKeys](../../../../reference/javax/xml/transform/OutputKeys.html) | Provides string constants that can be used to set output properties for a Transformer, or to retrieve output properties from a Transformer or Templates object. |\n| [Transformer](../../../../reference/javax/xml/transform/Transformer.html) | An instance of this abstract class can transform a source tree into a result tree. |\n| [TransformerFactory](../../../../reference/javax/xml/transform/TransformerFactory.html) | A TransformerFactory instance can be used to create [Transformer](../../../../reference/javax/xml/transform/Transformer.html) and [Templates](../../../../reference/javax/xml/transform/Templates.html) objects. |\n\nExceptions \n\n|-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| [TransformerConfigurationException](../../../../reference/javax/xml/transform/TransformerConfigurationException.html) | Indicates a serious configuration error. |\n| [TransformerException](../../../../reference/javax/xml/transform/TransformerException.html) | This class specifies an exceptional condition that occurred during the transformation process. |\n\nErrors \n\n|-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [TransformerFactoryConfigurationError](../../../../reference/javax/xml/transform/TransformerFactoryConfigurationError.html) | Thrown when a problem with configuration with the Transformer Factories exists. |"]]