See @XmlID and @XmlIDREF:
@XmlID
public String getId(){ ... }
@XmlIDREF
public Album getAlbumid(){ ... }
-W
On 18/02/2013, mjremijan_at_yahoo.com <mjremijan_at_yahoo.com> wrote:
> I have a question and I'm not even sure how to ask it so here is an
> example.
>
> Suppose I have an xml document structure like this:
>
> <Album id="123abc".../>
> <Pictures>
> <Picture id="xzy098" albumId="123abc" .... />
> </Pictures>
>
> When JAXB is parsing through this document, is there any way to
> configure the annotations on my object so JAXB can inject an instance
> of Album into an instance of Picture by matching the albumId value to
> the id value on <Album>
>
> thanks!
>