use container="true" on the field mapping for "zoo"...

<class name="foo">
   <field name="zoo" container="true"/>
</class>

--Keith


Nischala Kale wrote:
> 
> I tried using transient attribute - it supresses generating xml for the method - and 
> any subsequent classes as well..
> 
> The mapping file looks similar to -
> <class name="foo">
>   <field name="zoo" />
> </class>
> <class name="zoo">
>   <field name="bar"/>
> </class>
> 
> As expected, this will generate <foo><zoo><bar/></zoo></foo>
> I wanted to be able to skip generating zoo, but still get bar.
> If  I use the transient attribute, I get <foo/>
> 
> The reason I was looking for functionality as above is that while we are following 
> an industry standard schema to work with other companies, there is this one company 
> that does not follow the standard schema. To be able to generate xml for them, I 
> need to write a mapping file that is able to skip over certain elements, and add 
> their children to the parent element instead.
> 
> Thanks
> 
> 
>         -----Original Message-----
>         From: David Leangen [mailto:[EMAIL PROTECTED]
>         Sent: Thu 6/17/2004 12:14 AM
>         To: [EMAIL PROTECTED]
>         Cc:
>         Subject: Re: [castor-user] [XML] Skip generating an element
> 
> 
> 
>         Well, I'm not actually using the mapping files, but I noticed the following 
> in the doc in the description of the <field> element:
> 
>          "transient: if true, this field will be ignored during the marshalling.
>           This is usefull in when used with the auto-complete option."
> 
> 
>         Did you try that?
> 
> 
> 
> 
>         > -----Original Message-----
>         > From: Nischala Kale [mailto:[EMAIL PROTECTED]
>         > Sent: June 17, 2004 15:48
>         > To: [EMAIL PROTECTED]
>         > Subject: [castor-user] [XML] Skip generating an element
>         >
>         >
>         > I've been struggling with the following issue for sometime.
>         >
>         > The class structure is as follows -
>         >
>         > Class foo has a Method zoo getZoo()
>         >
>         > Class zoo has a Method bar getBar()
>         >
>         > But the XML that needs to be generated is like -
>         >
>         > <foo>  <bar>  </bar> </foo> i.e, the element zoo needs to to be skipped.
>         >
>         > Any idea on how I can write a mapping file to achieve this ?
>         >
>         >
>         >
>         > Thanks!
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
> 
> 
> 
>   ------------------------------------------------------------------------
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-user



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

Reply via email to