camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Bauhan <>
Subject JaxbDataFormat & escaping special characters
Date Mon, 26 Aug 2013 12:39:59 GMT

as JAXB does not escape special characters when marshaling, there exists 
a solution to use a special EscapingXMLStreamWriter (see 
I used this in combination with 
org.apache.commons.lang.StringEscapeUtils to replace the strings.

But I do not know how to replace the XMLStreamWriter used by 
JaxbDataFormat with my implementation. Is there a way to tell the 
JaxbDataFormat to use my EscapingXMLStreamWriter when marshaling?

The only other solution I could image is to define a Converter for the 
data field and call it via the bindings.xjb. But that is just a workaround.

Thanks, Sven

View raw message