How may I describe the Java classes with JAXB annotation (XMLJavaTYpeAdapter)? Actually I want to unmarshall the following XML format into Java object.
<map>
<entry key="extraProperties">
<map>
<entry key="message" value=""/>
<entry key="entity">
<map>
<entry key="starttime" value="1330086091375"/>
<entry key="state" value="1"/>
<entry key="uptime" value="2837656746"/>
</map>
</entry>
<entry key="childResources">
<map>
<entry key="transaction-service" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/transaction-service"/>
<entry key="http-service" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/http-service"/>
<entry key="applications" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/applications"/>
<entry key="deployment" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/deployment"/>
<entry key="jvm" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/jvm"/>
<entry key="web" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/web"/>
<entry key="security" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/security"/>
<entry key="network" value="https://47.168.96.31:4848/monitoring/domain1/instanceMaster/network"/>
</map>
</entry>
</map>
</entry>
<entry key="message" value=""/>
<entry key="exit_code" value="SUCCESS"/>
<entry key="command" value="Monitoring Data"/>
</map>
I have defined two classes names Map and Entry which holds Map element as List and two additional attributes. Ok now since this xml structure is static it is wasy to create classes corresponds to XML. I would like to know how the following xml can structure gets mapped into java classess.
As you can see that some entry tag has list element some entry tag onty has map elements, it is based on the rntry key name.