Thanks for the detailed description, I had the same problem and was able to fix it quickly because of your work!
Just for reference: I did not want to patch the source for BeanIO, so instead I added the following code to "patch" BeanIO at runtime:
static {
Class<XmlReader> xmlReaderClass = XmlReader.class;
try {
Field factoryField = xmlReaderClass.getDeclaredField("xmlInputFactory");
factoryField.setAccessible(true);
Object o = factoryField.get(null); // Get the factory
XMLInputFactory factory = (XMLInputFactory) o;
factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
System.out.println("QD: Patched BEANIO to use COALESCING character data.");
} catch (Exception x) {
System.err.println("==========================================================");
System.err.println("FAILED TO PATCH BEANIO - " + x);
System.err.println("==========================================================");
}
}
This uses Reflection to fix the issue. Add the code to some class as a static initializer, or call it once at init time.