title: Spark XML Tags are missing when null values are coming
body: <p>Below is the dataframe I have. </p>
  
  <pre>
  
  +-------+----+----------+
  |   city|year|saleAmount|
  +-------+----+----------+
  |Toronto|2017|      50.0|
  |Toronto|null|      50.0|
  |Sanjose|2017|     200.0|
  |Sanjose|null|     200.0|
  |  Plano|2015|      50.0|
  |  Plano|2016|      50.0|
  |  Plano|null|     100.0|
  |Newyork|2016|     150.0|
  |Newyork|null|     150.0|
  | Dallas|2016|     100.0|
  | Dallas|2017|     120.0|
  | Dallas|null|     220.0|
  |   null|null|     720.0|
  +-------+----+----------+
  </pre>
  
  <p>I tried to convert that to xml using </p>
  
  <pre><code>
  df.write.format("com.databricks.spark.xml")
      .mode("overwrite")
      .option("treatEmptyValuesAsNulls", "true")
      .option("rowTag", "ROW")
      .save("myxml") 
  </code></pre>
  
  <p>but some of the tags are missing in the xml like below</p>
  
  <pre><code>&lt;ROWS&gt;
      &lt;ROW&gt;
          &lt;city&gt;Toronto&lt;/city&gt;
          &lt;year&gt;2017&lt;/year&gt;
          &lt;saleAmount&gt;50.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Toronto&lt;/city&gt;
          &lt;saleAmount&gt;50.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Sanjose&lt;/city&gt;
          &lt;year&gt;2017&lt;/year&gt;
          &lt;saleAmount&gt;200.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Sanjose&lt;/city&gt;
          &lt;saleAmount&gt;200.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Plano&lt;/city&gt;
          &lt;year&gt;2015&lt;/year&gt;
          &lt;saleAmount&gt;50.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Plano&lt;/city&gt;
          &lt;year&gt;2016&lt;/year&gt;
          &lt;saleAmount&gt;50.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Plano&lt;/city&gt;
          &lt;saleAmount&gt;100.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Newyork&lt;/city&gt;
          &lt;year&gt;2016&lt;/year&gt;
          &lt;saleAmount&gt;150.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Newyork&lt;/city&gt;
          &lt;saleAmount&gt;150.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Dallas&lt;/city&gt;
          &lt;year&gt;2016&lt;/year&gt;
          &lt;saleAmount&gt;100.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Dallas&lt;/city&gt;
          &lt;year&gt;2017&lt;/year&gt;
          &lt;saleAmount&gt;120.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;city&gt;Dallas&lt;/city&gt;
          &lt;saleAmount&gt;220.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
      &lt;ROW&gt;
          &lt;saleAmount&gt;720.0&lt;/saleAmount&gt;
      &lt;/ROW&gt;
  &lt;/ROWS&gt;
  
  </code></pre>
  
  <p><strong><em>DataFrame when it printed, as shown above its giving all null values correctly. But when converted to XML the corresponding xml element tags are missing... Is this the way databrics XML api works ?</em></strong></p>
  
  <p>In above xml <code>year</code> is missing...  since <code>year</code> value is <code>null</code> in the dataframe.</p>
  
  <p>Is there any option in <a href="https://github.com/databricks/spark-xml" rel="nofollow noreferrer">spark-xml</a> s in which <code>null</code> value tags are also displayed ?</p>