How to project a null property to an empty XML element?

Hi folks,

One of my clients want to project a null property of a cache object to an empty XML element. Say, if we have a class:


Class Diabetes.BS.Message.LabReportMessage Extends Ens.Request
{

Property Report As %String;

Property IsRisky As %Boolean;

Property RiskValue As %String ;

}


If the instance of this class has a null RiskValue, after projection, they want the XML as following:

<LabReportMessage>
                <Report>Somestring</Report>
                <IsRisky>1</IsRisky>
                <RiskValue/>
 </LabReportMessage>

Is there any way we can do it? Thanks.

  • 0
  • 0
  • 195
  • 0
  • 1

Answers