| Author |
Problem in using xstream annotations for complex java objects
|
Deeps Mistry
Ranch Hand
Joined: Jan 31, 2009
Posts: 184
|
|
Hi,
I have a java object - Entity.java
I want to convert Entity.java to xml in the following format -
I have done something like this -
How do i annotate location and country?
Thanks.
|
 |
Deeps Mistry
Ranch Hand
Joined: Jan 31, 2009
Posts: 184
|
|
Deeps Mistry wrote:Hi,
I have a java object - Entity.java
I want to convert Entity.java to xml in the following format -
I have done something like this -
How do i annotate location and country?
Thanks.
Can anyone please help me out with this?
Thanks
|
 |
g tsuji
Ranch Hand
Joined: Jan 18, 2011
Posts: 225
|
|
How do i annotate location and country?
With the layout given, you practically no need to annotate location. For country, you simply alias the variable to country.
Most of the tag names will fall in place because you make the variable names conducive to the intended output.
Or do I miss something you have not shown (apart from those getters or setters or constructors...)?
|
 |
 |
|
|
subject: Problem in using xstream annotations for complex java objects
|
|
|