Hi @Manoj ,
A small google search resulted in an answer of rluta:
If you want to output null tags, you need to provide a default nullValue
that will appear in the tag:
df.write.format("xml")
.mode("overwrite")
.option("nullValue", "")
.option("rowTag", "ROW")
.save("myxml")
Original article: https://stackoverflow.com/questions/57810921/spark-xml-tags-are-missing-when-null-values-are-comingKind Regards,
Wilko
Please do not forget to "Accept the answer” wherever the information provided helps you, this can be beneficial to other community members. If you have extra questions about this answer, please click "Comment".