users@jaxb.java.net

Re: not display an attribute

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Mon, 12 Nov 2007 10:32:37 +0100

Hi.

> I would know if it possible to generate xml and to not display some choosen
> attribute.
>
> for example : a instance of class Apple with id=001, name='golden'
> color='yellow'
>
> i want that my xml looks like :
>
> <Apple>
> <name>golden</name>
> <color>yellow</color>
> </Apple>
>
> I know that if i want to unmarshall it i will lost the value of id.
>
> it this possible?


Not sure that this is what you want, but try making your id property
@XmlTransient.

Bye.
/lexi