Sandeep,

Whilst your answer is correct per se, it onyl applies to folks using XML 
schemas as a starting point. Which is not what the user was asking for .. ;-).

Werner

> -----Original Message-----
> From: Sandeep [mailto:[EMAIL PROTECTED] 
> Sent: Freitag, 12. Jänner 2007 08:13
> To: [email protected]
> Subject: Re: [castor-user] Castor mapping file to specify 
> optional elements
> 
> Hello Xinjun
> 
> If the element is an "attribute", you can use its attribute "use"
> which can take values like
> "optional|required"
> 
> For other elements, you can use the attribute "minOccurs" and 
> set it to value "0" to inform the 
> parser/marshalling-framework that this element is optional.
> 
> Hope that clarifies.
> 
> ~Sandeep
> 
> PS: In fact I am also new to castor, but learning it 
> furiously for some immediate project need:-)
> 
> On 1/12/07, Xinjun Chen <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am new to Castor. Could anyone tell me if there is any way to 
> > specify certain xml elements as optional? And in turn stop Castor 
> > marshalling framework from generating null elements.
> >
> >
> > Regards,
> > Xinjun
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to