views:

14

answers:

0

I have some XML to ingest that is set up like this

<project>
    <client>Some client</client>
    <description>some description</description>
</project>

The Objects I need to unmarshal this data to are Project and Client. How do I set up my castor mapping for this?

<class name="Project">
  <field name="description" type="string" />
  <field name="client" type="Client" />
</class>

If I used the above, and I have a constructor that takes a string, will I need to also doa mapping for the Client class - if so, what will that need to look like?