The Transformer interface Instances of this class are used to transform one type of Source to another. The instance is responsible for indicating what types of sources it can convert between. Note that a transformer is required to support the full cross-product of transformations implied by the supported input and output sources. In other words, a transformer must support transforming any supported input source to any supported output source.
Perform a transformation (i.e. a conversion or translation) from one of the supported to another supported source class instance. Parameter clazz specifies the class of the desired return object. For example if clazz is StreamSource.class, the return value from the method is an instance of StreamSource.
source - the current source instance that we wish to transform
clazz - the desired type of source we are trying to create
options - the set of options that may influence the transformation (e.g. character set encoding)