【发布时间】:2012-03-28 09:36:04
【问题描述】:
如何使用 JAXB 注释 (XMLJavaTYpeAdapter) 描述 Java 类?实际上我想将以下 XML 格式解组为 Java 对象。
<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>
【问题讨论】:
标签: jaxb