You have to get the ComplexType from the ElementDecl.

XMLType type = element.getType();
if (type.isComplexType()) {
   ComplexType cType = (ComplexType)type;
   Enumeration enum = cType.enumerate();
   while (enum.hasMoreElements()) {
       Structure st = (Structure) enum.nextElement();
       ...
   }
}

--Keith

"Ali, Haneef" wrote:
> 
> Hi,
> 
> How to get the children from org.exolab.castor.xml.schema.ElementDecl
> object. It has "hasChildren" method, but no method to get the children.
> 
> Regards,
> Haneef
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 22, 2004 8:29 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] List of string attributes
> 
> The mapping file and the current and required output file snippet below.
> Thanks
> 
> mapping file
> ============
> <mapping>
>         <class name="com.sanchez.xpress.XpressAppImpl">
>                 <map-to xml="functionalreq_design"/>
> <field name="frdGroupMembers" type="java.util.ArrayList">
>         <bind-xml name="frd_groupperson" node="element"
> location="frd_grpteam"/> </field>
> 
>         </class>
> </mapping>
> 
> current output format
> ======================
> <frd_grpteam>
>         <frd_groupperson>ggggg</frd_groupperson>
>         <frd_groupperson>anand</frd_groupperson>
> </frd_grpteam>
> 
> required output
> ==================
> <frd_grpteam>
>         <frd_groupperson name="ggggg"></frd_groupperson>
>         <frd_groupperson name="anand"></frd_groupperson> </frd_grpteam>
> 
> ============================================================
> 
> Quoting Arnaud Blandin <[EMAIL PROTECTED]>:
> 
> >
> > Could you please post the mapping files you used?
> >
> > Thanks,
> >
> > Arnaud
> >
> >
> >
> > This message is intended only for the use of the Addressee and may
> > contain information that is PRIVILEGED and CONFIDENTIAL. If you are
> > not the intended
> > recipient, dissemination of this communication is prohibited. If you
> > have
> > received this communication in error, please erase all copies of the
> > message
> > and its attachments and notify us immediately.
> >
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, March 22, 2004 4:13 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [castor-dev] List of string attributes
> > >
> > >
> > > Yes i tried all combinations in the mapping file. But i get
> > > it in the output below. Or in some other unwanted output.
> > >
> > > Thanks
> > >
> > > Quoting Arnaud Blandin <[EMAIL PROTECTED]>:
> > >
> > > >
> > > > Hi Anand,
> > > >
> > > > Have you tried to use a mapping file to set the output format?
> > > >
> > > > Thanks,
> > > >
> > > > Arnaud
> > > >
> > > >
> > > >
> > > > This message is intended only for the use of the Addressee and may
> >
> > > > contain information that is PRIVILEGED and CONFIDENTIAL. If you
> > > > are
> >
> > > > not the intended recipient, dissemination of this communication is
> >
> > > > prohibited. If you have received this communication in
> > > error, please
> > > > erase all copies of the message and its attachments and notify us
> > > > immediately.
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > > > Sent: Monday, March 22, 2004 3:12 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: [castor-dev] List of string attributes
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > My situation :
> > > > > Class ListContainer{
> > > > >         List myList;
> > > > > }
> > > > >
> > > > > There is a list Containing java.lang.String values eg
> > > > > "oneString"
> >
> > > > > ."twoString"
> > > > >
> > > > > I want the xml in this format.
> > > > >
> > > > > <ListContainer>
> > > > >         <mystrings name="oneString"/>
> > > > >         <mystrings name="twoString"/>
> > > > > </ListContainer>
> > > > >
> > > > >
> > > > >
> > > > > I was able to get it as elements.
> > > > > <ListContainer>
> > > > >         <mystrings> oneString<mystrings/>
> > > > >         <mystrings>twoString<mystrings/>
> > > > > </ListContainer>
> > > > >
> > > > > Been trying various things for a couple of days without success.
> > > > >
> > > > > Thanks in Advance.
> > > > >
> > > > > Anand
> > > > >
> > > > > ______________________________________________________________
> > > > > ________________
> > > > > This e-mail is intended only for the use of individual(s) named
> > > > > above. If you are not the intended recipient of this email, or
> > > > > employee or agent responsible for delivering it to the intended
> > > > > recipient, you are hereby notified that any dissemination
> > > or copying
> > > > > of this e-mail is strictly prohibitted. If you have received
> > > > > this
> >
> > > > > e-mail in error, immediately notify us by e-mail at :
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > > -----------------------------------------------------------
> > > > > If you wish to unsubscribe from this mailing, send mail to
> > > > > [EMAIL PROTECTED] with a subject of:
> > > > >         unsubscribe castor-dev
> > > > >
> > > >
> > > > -----------------------------------------------------------
> > > > If you wish to unsubscribe from this mailing, send mail to
> > > > [EMAIL PROTECTED] with a subject of:
> > > >         unsubscribe castor-dev
> > > >
> > > >
> > >
> > > ______________________________________________________________
> > > ________________
> > > This e-mail is intended only for the use of individual(s)
> > > named above. If you are not the intended recipient of this
> > > email, or employee or agent responsible for delivering it to
> > > the intended recipient, you are hereby notified that any
> > > dissemination or copying of this e-mail is strictly
> > > prohibitted. If you have received this e-mail in error,
> > > immediately notify us by e-mail at :
> > > [EMAIL PROTECTED]
> > >
> > > -----------------------------------------------------------
> > > If you wish to unsubscribe from this mailing, send mail to
> > > [EMAIL PROTECTED] with a subject of:
> > >         unsubscribe castor-dev
> > >
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
> >
> >
> 
> ________________________________________________________________________
> ______
> This e-mail is intended only for the use of individual(s) named above.
> If you
> are not the intended recipient of this email, or employee or agent
> responsible
> for delivering it to the intended recipient, you are hereby notified
> that any
> dissemination or copying of this e-mail is strictly prohibitted. If you
> have
> received this e-mail in error, immediately notify us by e-mail at :
> [EMAIL PROTECTED]
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to