How to Output <element xsi:nil="true"/> from a DTL Transformation in EnsLib.EDI.XML.Document?
Hi everyone,
I'm working on a DTL that transforms an HL7 message (EnsLib.HL7.Message) to an XML document (EnsLib.EDI.XML.Document).
The target XML is based on a custom schema and has an element like:
<xs:element name="deceasedDateTime" type="xs:dateTime" nillable="true"/>
What I need is for the output to show:
<deceasedDateTime xsi:nil="true"/> when the source HL7 value is empty, for eg:
<portalPatientUpdate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<deceasedDateTime xsi:nil="true" />
</portalPatientUpdate>
My questions:
- How can I correctly assign
xsi:nil="true"in the DTL transformation? - Where/how should I declare the
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"namespace?
Any help would be appreciated.
Thanks
Product version: Ensemble 2018.1
Discussion (0)0