Hi,
Well, I can do my xsd as described, and I can marshall it like here:
<pers>
<name>Joe</name>
<firm>
<name>ACME</name>
<directorPerson>
<name>Sam</name>
<!-- no firm -->
</directorPerson>
</firm>
</pers>
My problem is that what if Sam's firm is ACME. Then the marshalling
can get into an infinity loop. If I'm right, how can I achive it
doesn't happen? Eg. stop the marshalling process if it processes the
same object.
Thanks,
On 8/2/06, Dmitri Colebatch <dim_at_colebatch.com> wrote:
> Hi Csik,
>
> Sorry - my apologies, I completely missed the recusive reference. I
> don't believe there are any samples that cover it. Having said that I
> do have some recollection of seeing similar discussions in the past.
> I suppose the real question is what would you want it marshalled into?
>
> cheers
> dim
>
> On 8/2/06, Csík Norbert <norbert.csik_at_gmail.com> wrote:
> > I'm sorry, maybe I'm doing something wrong, but I can't find a related
> > example. Can you help me what did you mean?
> >
> > Thanks,
> >
> > On 8/1/06, Dmitri Colebatch <dim_at_colebatch.com> wrote:
> > > Hi,
> > >
> > > Yes JAXB can marshall that - please have a look at the samples
> > > provided before asking such a question.
> > >
> > > dim.
> > >
> > > On 8/1/06, Csík Norbert <norbert.csik_at_gmail.com> wrote:
> > > > Hi!
> > > >
> > > > Can JAXB marshall an the following object structure, and if so then how?
> > > >
> > > > pers1.name = "John"
> > > > pers1.firm = firm1
> > > >
> > > > firm1.name = "ACME"
> > > > firm1.directorPerson = pers1
> > > >
> > > > marshal(pers1)
> > > >
> > > > Thanks,
> > > >
> > > > --
> > > > Norbert Csík
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > > > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> > >
> > >
> >
> >
> > --
> > Norbert Csík
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
--
Norbert Csík