Yes I mean the regular way is instantiate from jaxb objects and call setter methods but I want to instantiate and call setter methods in dynamically (I mean without I know the name of object I loop in jaxb objects , instantiate it and setting their methods), I know that I must use class.forname but I have to know the root element for setting another elements in it .
do you have any suggestion or better way for doing this for me ?
Thanks for your attention.
Shariat
--- On Mon, 9/29/08, Wolfgang Laun <wolfgang.laun_at_gmail.com> wrote:
> From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
> Subject: Re: How to fill dynamically JAXB java objects
> To: users_at_jaxb.dev.java.net
> Date: Monday, September 29, 2008, 3:31 AM
> What do you mean by "fixed way" and what by
> "fill dynamically"? Perhaps you
> post a Java code snippet of what you call "fixed
> way".
>
> Generally speaking, you create an object by a call to one
> of the methods in
> some JAXB generated ObjectFactory class
> ("createSomeElement") and then you
> call the methods setThisSubElement( ... ) and
> setTahtAttribute( ... ) of the
> newly generated object. Except for the root element, all of
> these created
> objects have to be entered with setter methods as
> sub-elements of their
> parent elements.
>
>
> On Sat, Sep 27, 2008 at 9:24 AM, maliheh shariat
> <malsh20_at_yahoo.com> wrote:
>
> > Hi Friends
> >
> > I created Jaxb java classes and now I want to fill
> them dynamically , but I
> > dont know how I can dynamically fill JAXB java objects
> (I can do it in fix
> > way) ,I must say that their data are in xml file to
> fill java objects ,
> > please help me.
> >
> > Thanks alot
> >
> > Shariat
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail:
> users-help_at_jaxb.dev.java.net
> >
> >