Jaxb how to create xml element container for other xml element



I have some class:



public class Human{
private String lastName;
private String firstName;
private String patronymic;
private String dateOfBirth;
//..
}


I want marshall this class to some xml:



<human>
<fio>
<lastname></lastname>
<firstname></firstname>
<patronymic></patronymic>
</fio>
<dateOfBirth><dateOfBirth>
</human>


What annotation is used to create pseudo-container fields?


No comments:

Post a Comment