[Simple-support] null variables and suppressing empty tags
Brought to you by:
niallg
|
From: Erez L. <er...@es...> - 2011-09-20 13:52:53
|
I have an annotated class that has a null field like this:
@Root(name = "ContinuityOfCareRecord")
class Test1 {
@Element(name = "ActorID", required = false)
@Path("Patient")
protected String patientId;
}
generating the XML gives:
<ContinuityOfCareRecord>
<To/>
</ContinuityOfCareRecord>
Is there any way to automatically suppress the <To/> tag since there are no
values under it?
Thanks!
|