users@jaxb.java.net

JAXB Binder issues

From: Adam Lantos <hege_at_playma.org>
Date: Tue, 20 Apr 2010 11:54:06 +0200

Hi,

I am planning on using JAXB Binder for synchronizing DOM/JAXBElement
hierarchies, and I have several problems with it.

I seem to be affected by
https://jaxb.dev.java.net/issues/show_bug.cgi?id=459, even with the
newest-greatest 2.2 version:

Exception in thread "main" java.lang.NullPointerException
        at com.sun.xml.bind.v2.runtime.BinderImpl.updateXML(BinderImpl.java:194)
        at com.sun.xml.bind.v2.runtime.BinderImpl.updateXML(BinderImpl.java:182)


Secondly, even though the jsr-222 specs and Binder API docs says that
it should preserve XML comments and formatting, calling the updateXML
method yields reformatted XML with many whitespaces (in fact almost
all whitespaces) and all comments removed.

Thirdly, I need to have pretty-formatted XML. With Marshaller, I can
do this with the jaxb.formatted.output property, but Binder ignores
that. Do you have any ideas how to deal with pretty-formatting wrt the
Binder implementation?


thanks,
 Adam