| Author |
XMLStreamReader to InputStream
|
Arundhathi Menon
Ranch Hand
Joined: Jan 14, 2004
Posts: 113
|
|
Hi,
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.
Can someone help?
Thanks in advance
Menon
|
SCJP , SCWCD , SCBCD , SCDJWS
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
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.
|
 |
 |
|
|
subject: XMLStreamReader to InputStream
|
|
|