camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aki Yoshida <>
Subject StAXSource to InputStream direct conversion
Date Thu, 07 May 2015 14:26:00 GMT
There is currently no direct type conversion from StAXSource or
XMLStreamReadder to InputStream. Am I correct? I noticed this while
looking at the camel-cxf's StAXSource related xml-namespace issue
(CAMEL-8663) when converting to InputStream, the conversion succeeded
but went via DOM's NodeList, which you wouldn't really want.

Assuming this assumption, I am wondering if we can add a direct
converter. I wrote a class that can convert XMLStreamReader to
InputStream or Reader using a small buffer while I was doing the
xmltokenizer last year. A converter can be easily written using this

The code is available here and you can look at them.

Let me know what you think.

regards, aki

View raw message