Hi, pablo fernandez wrote: > Hi Werner, > > Yes, I'm using a mapping file for the Person object, to map fields to tag > names, the problem is that I would need kind of a mapping file for the > collection... > > I'm wondering if there's a way to define the value of the tag of a > collection of objects, something like this on-collection attribute (I made > this up): Not really. But have a look at Marshaller#setRootElement(String) that allows you to configure the name of the root element upon marshalling.
> > <mapping> > <class name="com.model.Person" [on-collection="people"]> > <field name="userID"> > <bind-xml node="element" name="userID" /> > </field> > > On Tue, Sep 8, 2009 at 12:46 PM, Werner Guttmann <[email protected]>wrote: > >> Hi, >> >> are you already using mapping file ? >> >> lG. >> Werner >> >> pablo fernandez wrote: >>> ---------- Forwarded message ---------- >>> From: pablo fernandez <[email protected]> >>> Date: Mon, Sep 7, 2009 at 12:36 PM >>> Subject: Changing an arraylist's tag name >>> To: [email protected] >>> >>> >>> Hi, >>> >>> When I pass the marshaller a collection of mapped objects (say >>> List<Person>), the result is wrapped in two <array-list> tags... >>> >>> Is it possible to change it to something like >>> <people><person>....</person></people>? >>> >> --------------------------------------------------------------------- >> 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

