if the column is null, xmlsequence will not generate the tag. But need to generate the empty tag.
I'm working a SQL to generate the XML in a relational db using xmlsequence. Here is the test case:
create a relational table and insert a record:
create table ken_test
(col1 varchar2(10)
,col2 varchar2(10)
,col3 varchar2(10)
);
Insert Into ken_test
(col1) Values ('ok to create');
Then using the following to generate XML:
Select Value(h)
From Table(xmlsequence(Cursor (Select * From ken_test),xmlformat('test'))) h;
The result wll be:
<test>
<COL1>ok to create</COL1>
</test>
and the columns COL2 and COL3 are omitted since they are null.
How can I geneate the tags for all columns even if they are in null values?