Jens,

Thanks, this is a great help.
        - Thomas.

At 15:45 26/06/2002 +0200, Jens v. Pilgrim wrote:
Hello Thomas Nichols,

Wednesday, June 19, 2002, 5:39:14 PM, Thomas Nichols wrote:

TN> I need to take the Result, and have it
TN> become one of the Source params for a second invocation of foo(). How can I
TN> accomplish this, short of serializing the data out to a StringBuffer and
TN> reading it back in again?


I'm not sure how you generate the first call to foo() and how your
documents look like. But I think the easiest way to create a Source
from a Result is by usng DOMSource and DOMResult. Since you're
creating the Source and the Result parameter when passing the
instances to the transformer, it's no problem:

----------8X----------8X----------8X----------8X----------8X----------
Transformer trans = [some transformer instance];
Source    initialSource = [some Source];
DOMResult myDOMResult = new javax.xml.transform.dom.Result();

trans.transform(initialSource, myDOMResult);

DOMSource myDOMSource =
          new javax.xml.transform.dom.Source(myDOMResult.getNode());

// .. and here we go ...
----------8X----------8X----------8X----------8X----------8X----------

Best regards,
 Jens



Reply via email to