Hi,
I am trying to unmarshall an XML document below:
<?xml version="1.0" encoding="UTF-8"?>
<instrument>
<date>04-Feb-2008</date>
<bbg>A2A IM Equity</bbg>
<sedol>5499131</sedol>
<isin>IT0001233417</isin>
<bookqty></bookqty>
</instrument>
Using the following code:
Instrument instrument = (Instrument) Unmarshaller.unmarshal(
Instrument.class, new FileReader("Instrument.xml"));
System.out.println(instrument.getBbg());
this works fine except when I have a root element e.g.
<?xml version="1.0" encoding="UTF-8"?>
<ins>
<instrument>
<date>04-Feb-2008</date>
<bbg>A2A IM Equity</bbg>
<sedol>5499131</sedol>
<isin>IT0001233417</isin>
<bookqty></bookqty>
</instrument>
</ins>
The all the fileds in my Instrument object are null!!
Can anyone please help?
Thanks,
G
--
View this message in context:
http://www.nabble.com/Unmarshalling-Root-node-problem-tp16537521p16537521.html
Sent from the Castor - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email