I am using toxml() function to generate a xml file from a CDT. For some reason t

I am using toxml() function to generate a xml file from a CDT. For some reason the elements of the xml are rendered differently when they are blank. In one case the namespace is added like this:
<someElement xmlns:xsi="www.w3.org/.../XMLSchema-instance" xsi:nil="true" />

In another case the element is just empty:
<anotherElement></anotherElement>

Ideally I would like the xml to not contain the elements if they are empty and are configured to be nillable. How could I do this?

Thanks, Moritz...

OriginalPostID-68300

OriginalPostID-68300

  Discussion posts and replies are publicly visible