Women in Technology

Hear us Roar



Article:
  XML Data Binding with Castor
Subject:   creating an address book using marshal
Date:   2002-05-30 05:35:52
From:   howardjfraser

If I create an address book XML file by creating an instance of Addressbook, then using marshal and the mapping.xml file provided, I get the following XML structure



<addressbook>
<persons name = "xxx"> ... </persons>
<persons name = "yyy"> ... </persons>
</addressbook>



I.e. the field name is personS not person. Can anyone shed any light on this?


thanks

Full Threads Newest First

Showing messages 1 through 1 of 1.

  • creating an address book using marshal
    2003-07-23 07:35:54  anonymous2 [View]

    Hi

    In your XML mapping add the line

    <bind-xml name="person"/>

    after
    <field name="persons" type="Person" collection="collection" />

    Thanks.