users@jaxb.java.net

Re: cloning of extended JAXB elements

From: Hanson Char <hanson.char_at_gmail.com>
Date: Mon, 25 Jun 2007 09:18:39 -0700

I have succesfully used Beanlib to clone Jaxb objects in the past. A
shamelss plug :)

  http://beanlib.sourceforge.net/

Hanson Char

On 6/25/07, Christophe Alexandre <alexandre_at_magillem.com> wrote:
> Hi all,
> I have generated JAXB objects and I have extended them. I have
> defined my own ObjectFactory as explained in https://
> jaxb.dev.java.net/guide/Adding_behaviors.html
> My question is : what is the best way to clone them, I don't want to
> define a clone method in my extending objects because this would be
> to complicated.
> What I deed is to marshall in a DOM document before unmarshaling them
> back. Is this a good solution ?
>
> Another problem is that some of these elements do not have the
> XmlRootElement tag.
> Therefore, the marshaling does not work. I've tried what's explained
> here : https://jaxb.dev.java.net/guide/
> _XmlRootElement_and_unmarshalling.html but it did not work and
> I must add the XmlRootElement in the generated classes.
>
> Any hints ?
>
> Regards.
> Christophe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>