Re: [Simple-support] null variables and suppressing empty tags
Brought to you by:
niallg
|
From: Erez L. <er...@es...> - 2011-09-20 19:06:10
|
Doesn't look like the @Path annotation accepts required=false. It looks
like @Path only accepts one parameter, the path string...
On Tue, Sep 20, 2011 at 11:52 AM, James Oltmans
<Jam...@ip...>wrote:
> Set required = false for the To element****
>
> ** **
>
> *From:* Erez Lirov [mailto:er...@es...]
> *Sent:* Tuesday, September 20, 2011 7:25 AM
> *To:* sim...@li...
> *Subject:* [Simple-support] null variables and suppressing empty tags****
>
> ** **
>
> 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!****
>
--
The materials in this e-mail are private, may contain Protected Health
Information as defined by the Health Insurance Portability and Accounting
Act of 1986 (as codified at 42 U.S.C. 1320d through d-8), and are intended
only for the use of the individual(s) named above. If you are not the
intended recipient of this e-mail, or the employee or agent responsible for
delivering this to the intended recipient, you are hereby notified that any
unauthorized use, disclosure, copying, distribution or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this e-mail in error, please immediately
notify us by telephone at 877-753-4286 or notify us by e-mail at
hel...@ve.... Thank you.
|