Hi. I have custom classes and would like to unmarshall an xml to java objects.
The xml is as follows:
<Account>
<id>324</id>
<Balance>
<amount>23.34</amount>
</Balance>
</Account>
My unmarshall code is as follows:
FileReader reader = new FileReader("account.xml");
Account account = Unmarshaller.unmarshall(Account.class, reader);
When I try to do a account.getBalance(), I get a "null" instead of a Balance
object. Account.java and Balance.java are Serializable objects and exist in the
same package. Using Castor 1.1. Anything special I need to do ?
Thx
-- pady
_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_012008