public class TransformerUtil extends Object
Constructor and Description |
---|
TransformerUtil() |
Modifier and Type | Method and Description |
---|---|
static Transformer |
getStaxSourceToDomResultTransformer()
Get the Custom Stax Source to DOM result transformer that has been written to get over the JDK transformer bugs
(JDK6) as well as the issue of Xalan installing its Transformer (which does not support stax).
|
static Transformer |
getTransformer()
Get the Default Transformer
|
static TransformerFactory |
getTransformerFactory()
Creates a
TransformerFactory . |
static void |
transform(JAXBContext context,
JAXBElement<?> jaxb,
Result result) |
static void |
transform(Transformer transformer,
Source source,
DOMResult result)
Use the transformer to transform
|
static void |
transform(Transformer transformer,
StAXSource stax,
DOMResult result)
Use the transformer to transform
|
public static Transformer getTransformer() throws ConfigurationException
ConfigurationException
public static TransformerFactory getTransformerFactory() throws TransformerFactoryConfigurationError
Creates a TransformerFactory
. The returned instance is cached and shared between different
threads.
TransformerFactoryConfigurationError
public static Transformer getStaxSourceToDomResultTransformer() throws ConfigurationException
ConfigurationException
public static void transform(Transformer transformer, StAXSource stax, DOMResult result) throws ParsingException
transformer
- stax
- result
- ParsingException
public static void transform(Transformer transformer, Source source, DOMResult result) throws ParsingException
transformer
- source
- result
- ParsingException
public static void transform(JAXBContext context, JAXBElement<?> jaxb, Result result) throws ParsingException
ParsingException
Copyright © 2017 JBoss by Red Hat. All rights reserved.