users@jaxb.java.net

Re: Can jaxb inject references objects?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 19 Feb 2013 07:54:42 +0100

Hi,

yes, see @XmlID/_at_XmlIDREF. You can al provide your own IdResolver.

Bye,
/lexi

On Mon, Feb 18, 2013 at 9:02 PM, <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!