Yes it worked like a charm and I even realized that I could do things
like
location="bar/lowerLevel"
to map things like:
<foo>
<bar>
<lowerLevel/>
</bar>
</foo>
down to the foo level!
For many of the simple things that I need to do, ending up with an obj
hierarchy that requires:
foo.getThis().getThat().getTheOther().getUnknown().getEnoughAlready()...
.
gets a "bit" tedious so this mapping helps normalize things for some of
the simple cases.
thanks
dave z
> -----Original Message-----
> From: Bruce Snyder [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 17, 2005 9:53 AM
> To: [email protected]
> Subject: Re: [castor-user] Flatten xml?
>
>
> On 8/17/05, Stephen Bash <[EMAIL PROTECTED]> wrote:
>
> > In Castor such a process is fairly easy. Using a mapping
> file, you can
> > specify that the <name1> and <name2> elements reside inside
> <bar> using
> > the location attribute. Here's an example:
> >
> > <mapping>
> > <class name="Foo">
> > <map-to xml="foo" />
> > <field name="name1" type="string" />
> > <bind-xml name="name1" location="bar" />
> > </field>
> > <field name="name2" type="string" />
> > <bind-xml name="name2" location="bar" />
> > </field>
> > </class>
> > </mapping>
>
> Ah yes, the location attribute. I completely forgot about this! A much
> better suggestion, Stephen. Scratch my response concerning the
> container attribute.
>
> Bruce
> --
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> The Castor Project
> http://www.castor.org/
>
> Apache Geronimo
> http://geronimo.apache.org/
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
>
>
>
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------