Problem : Oracle How can I create an empty XML element like in Oracle

Problem : Oracle How can I create an empty XML element like <Signature></Signature> in Oracle

How can I create an empty XML element like  when I am select the fields from oracle?

hill

I tried using xmlelemt and xmlforest xlmconcat.

They all will not output an empty element.
How can I do this with out have to write a lot of code?
Thanks


Solution: Oracle How can I create an empty XML element like <Signature></Signature> in Oracle

I see, you want to have the xml tag even if the column value is null, is it? Try this workaround. My previous posts were to generate empty tags using these functions.

select replace( xmlelement(“employee”,
xmlelement(“No”, nvl( to_char(empno), ‘*’) ),
xmlelement(“Name”, nvl( ename, ‘*’) )) , ‘*’, null) empdata
from emp