I have an xml and and at that XML I have too many child fields such like . From the documentation that I read, I see that JAXB auto generated xml to pojo classes but there is a remark there , JAXB can create fields as well ? I meant do i have to create Employee class and its methods such like String job, String id myself or JAXB will create it themselves ? If my question is not clear, I can provide sample codes.
Cheers Alper
<code>
<Employee>
<id>121</id>
<name>Alper</name>
</Employee>
</code>
Do I have to create String id; String name; as well ?
You have 2 options:
But XML sample itself is not enough surely.
More information here: https://docs.oracle.com/javase/tutorial/jaxb/intro/examples.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.