Hi
In case others will experience the same problem some time in the future:
I solved this by extending the XstreamMarshaller and overriding the method
Code:
protected void marshalSaxHandlers(Object graph, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws XmlMappingException
{
SaxWriter saxWriter = new SaxWriter();
saxWriter.setContentHandler(contentHandler);
marshal(graph, saxWriter);
}
with
Code:
@Override
protected void marshalSaxHandlers(Object graph, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws XmlMappingException {
SaxWriter saxWriter = new SaxWriter(new XmlFriendlyReplacer("ddd","_"));
saxWriter.setContentHandler(contentHandler);
marshal(graph, saxWriter);
}
Don't know if this is the best solution, but it seems to work ok for me so far.