title: Is it possible to not show xmlelement when null in plsql?
body: <p>I have a question regarding xmlelement in plsql.</p>
  
  <p>My code looks like:</p>
  
  <pre><code>SELECT XMLROOT(
    XMLELEMENT("FirstElement", 'data1'),
    (SELECT XMLAGG(
      XMLELEMENT( "IterationElement1",
        XMLFOREST(
          'value1' AS "FirstSubElement"
          'value2' AS "SecondSubElement"
        )
      ),
      XMLELEMENT( "IterationElement2", CASE WHEN a &lt;&gt; c THEN DECODE( a, 1, 'Y', 'N') ELSE NULL END),
      XMLELEMENT( "IterationElement3", CASE WHEN b &lt;&gt; c THEN DECODE( b, 1, 'Y', 'N' ) ELSE NULL END)
    )
    FROM T2 where id = in_id
    )
  )
  FROM T1
  WHERE id = in_id
  </code></pre>
  
  <p>Currently for IterationElement2 and 3 i would like for them to not show in the output when the value is null, is this possible in some way?</p>