My webservice call returns an XMLStreamReader. I would like to know how to extract just the string representation of the whole xml so that I can dump it in the DB for future processing.
I short , converting the XMLStreamReader's content into an outputstream is what I need.
Then you need an identity Transformer. When you call its transform(Source, Result) method the Source should be a StAXSource which wraps that XMLStreamReader, and the Result should be a StreamResult which wraps a StringWriter.
Paul Clapham wrote:Then you need an identity Transformer. When you call its transform(Source, Result) method the Source should be a StAXSource which wraps that XMLStreamReader, and the Result should be a StreamResult which wraps a StringWriter.
I think what he meant was:
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad: