/** * Returns the root qualified name of the given source, transforming it if necessary. * * @param source the source to get the root element from * @param transformerFactory a transformer factory, necessary if the given source is not a {@code DOMSource} * @return the root element, or {@code null} if {@code source} is {@code null} */ public static QName getPayloadRootQName(Source source, TransformerFactory transformerFactory) throws TransformerException { return getPayloadRootQName(source, new TransformerHelper(transformerFactory)); }
/** * Returns the root qualified name of the given source, transforming it if necessary. * * @param source the source to get the root element from * @param transformerFactory a transformer factory, necessary if the given source is not a <code>DOMSource</code> * @return the root element, or <code>null</code> if <code>source</code> is <code>null</code> */ public static QName getPayloadRootQName(Source source, TransformerFactory transformerFactory) throws TransformerException { return getPayloadRootQName(source, new TransformerHelper(transformerFactory)); }
/** * Returns the root qualified name of the given source, transforming it if necessary. * * @param source the source to get the root element from * @param transformerFactory a transformer factory, necessary if the given source is not a {@code DOMSource} * @return the root element, or {@code null} if {@code source} is {@code null} */ public static QName getPayloadRootQName(Source source, TransformerFactory transformerFactory) throws TransformerException { return getPayloadRootQName(source, new TransformerHelper(transformerFactory)); }
/** * Returns the root qualified name of the given source, transforming it if necessary. * * @param source the source to get the root element from * @param transformerFactory a transformer factory, necessary if the given source is not a {@code DOMSource} * @return the root element, or {@code null} if {@code source} is {@code null} */ public static QName getPayloadRootQName(Source source, TransformerFactory transformerFactory) throws TransformerException { return getPayloadRootQName(source, new TransformerHelper(transformerFactory)); }
/** * Does transofrmation. * @param source * @param result */ public static void transform(Source source, Result result) { try { new TransformerHelper().transform(source, result); } catch (TransformerException e) { throw new IllegalArgumentException("Can not transform",e); } }