I need to map an XML fragment to a Java class using JAXB, but you have a difficult case. I have the following XML:
<person>
<name part="first">Richard</name>
<name part="last">Brooks</name>
</person>
and you need to map it to the next class
public class Person {
private String firstName;
private String lastName;
}
Could you help me figure out the JAXB annotations to make this possible?
source
share