org.springframework.integration.xml.transformer
Class ResultToDocumentTransformer

java.lang.Object
  extended by org.springframework.integration.xml.transformer.ResultToDocumentTransformer
All Implemented Interfaces:
ResultTransformer

public class ResultToDocumentTransformer
extends java.lang.Object
implements ResultTransformer

Creates a Document from a Result payload. Supports DOMResult and StringResult implementations.

Author:
Jonas Partner

Field Summary
private  javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory
           
 
Constructor Summary
ResultToDocumentTransformer()
           
ResultToDocumentTransformer(javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory)
           
 
Method Summary
protected  org.w3c.dom.Document createDocumentFromDomResult(javax.xml.transform.dom.DOMResult domResult)
           
protected  org.w3c.dom.Document createDocumentFromStringResult(org.springframework.xml.transform.StringResult stringResult)
           
protected  javax.xml.parsers.DocumentBuilder getDocumentBuilder()
           
 java.lang.Object transformResult(javax.xml.transform.Result res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentBuilderFactory

private final javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory
Constructor Detail

ResultToDocumentTransformer

public ResultToDocumentTransformer(javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory)

ResultToDocumentTransformer

public ResultToDocumentTransformer()
Method Detail

transformResult

public java.lang.Object transformResult(javax.xml.transform.Result res)
Specified by:
transformResult in interface ResultTransformer

createDocumentFromDomResult

protected org.w3c.dom.Document createDocumentFromDomResult(javax.xml.transform.dom.DOMResult domResult)

createDocumentFromStringResult

protected org.w3c.dom.Document createDocumentFromStringResult(org.springframework.xml.transform.StringResult stringResult)

getDocumentBuilder

protected javax.xml.parsers.DocumentBuilder getDocumentBuilder()