After upgrade my DB from version 11.2.0.4 up to 18 I observe that from now XMLType.getClobVal() returns an empty XML elements for null valued attributes of types. For example type:
create or replace type kl_test force as object(id number,str varchar2(10));
when I execute following code snippet:
begin
dbms_output.put_line( XmlType(cabasys.kl_test(1,null)).getClobVal());
end;
then instead of
<KL_TEST><ID>1</ID></KL_TEST>
I got
<KL_TEST>
<ID>1</ID>
<STR/>
</KL_TEST>
I found that this was treated as a bug and fixed within version 12.
Is is any possibility to back to previous behavior and do not send empty elements? It unnecessary utilizes memory and space when processing large object with nullable attributes.