Hi,
if I use teh following mapping:
<field name="subList" set-method="setSubList" get-method="getSubList"
type="string"
collection="arraylist">
<bind-xml name="id" location="Sub" node="attribute"/>
</field>
the marshalling works, but than the same object- structure is unmarshalled, I get the following xml file:
<Element>
<Sub id="[EMAIL PROTECTED]"/>


</Element>
(Using *Castor 0.9.5.3)*
bye
Roland

Roland Spatzenegger wrote:


Hi,
I have the following XML Document
<Element>
<Sub id="1"/>
<Sub id="2"/>
<Sub id="3"/>
</Element>
and want to map it to:
class Element {
List<String> ids;
}
But I have no idea how to do it. The only solution I got, is to make a class "Sub" with the following mapping:
<class name="Element">
<map-to xml="Element"/>
<field name="subList" set-method="setSubList" get-method="getSubList" type="Sub" collection="arraylist">
<bind-xml name="Sub"/>
</field>
..



-- Roland Spatzenegger 4Soft GmbH mailto:[EMAIL PROTECTED] Mittererstra�e 3, 80336 M�nchen tel: +49-89-530744-520 Sitz der Gesellschaft: M�nchen fax: +49-89-530744-45 Amtsgericht M�nchen: HRB 125474 www.4soft.de Gesch�ftsf�hrer: Dr. Klaus Bergner, Dr. Marc Sihling



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

Reply via email to