我想通过使用JAXB取消编组将XML转换为java。
这是我的员工.xml。我试图转换,但它显示错误javax.xml.bind.UnmarshalException
<?xml version="1.0" encoding="UTF-8"?>
<deptname name="Research">
<employee>
<eid>r-001</eid>
<ename>Dinesh R</ename>
<age>35</age>
<deptcode>d1</deptcode>
<deptname>Research</deptname>
<salary>20000</salary>
</employee>
</deptname>
<deptname name="Sales">
<employee>
<eid>s-001</eid>
<ename>Kanmani S</ename>
<age>35</age>
<deptcode>d2</deptcode>
<deptname>Sales</deptname>
<salary>30000</salary>
</employee>
</deptname>
<deptname name="Delivery">
<employee>
<eid>d-001</eid>
<ename>Kanchana M</ename>
<age>35</age>
<deptcode>d3</deptcode>
<deptname>Delivery</deptname>
<salary>20000</salary>
</employee>
</deptname>
www说
相关分类