users@jaxb.java.net

Re: JAXB Binder issues

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Tue, 20 Apr 2010 12:56:14 +0200

Hello Adam,


Adam Lantos wrote:
> 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)
>

looks like fix for that issue was reverted and I didn't update original
issue (sorry for that) - reopened.

>
> 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.
>
feel free to file a new issue, preferably with a testcase

> 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?
>
that should work - do you get PropertyException when you try
Binder.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); ?

Regards,
Pavel

>
> thanks,
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>