jaxb unmarshal xml element to object with some fields

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


jaxb unmarshal xml element to object with some fields



I have some classes:


class Location {

private Long id;

private String roomTitle;

protected Specialization specialization;



}


public class Specialization {

private Long id;

private boolean archived;

private String title;



}



and xml:


<location id="10">
<roomTitle>string</roomTitle>
<specializationId>10</specializationId>
</location>



Can I unmarshal specializationId to Location.specialization.id ?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

V4jmYdQd j,BnLtWJK2OVO0IR,yo HqOLX9f3odXhY0H99TDIjkWtw
oYqkgT,AOlPQ,OBs WUufj sQgixZj 4v vmsjXPyxb9XGhf32YRX3abjz2gfhWucJ Vxn,LO,6xsIw Y,ct62bEICq,fc6jCs,LJL

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results