I want to create the XML of my DataSet using the .writeXml function. If the record in my DataSet was empty, I would like to have an empty tag instead of a missing tag:
an example of how it should look if John was not of age:
<MyDataSet>
<ID>8613458</ID>
<AW_ID>37534778</AW_ID>
<NAME>Peter</NAME>
<AGE>22</AGE>
</MyDataSet>
<MyDataSet>
<ID>8613459</ID>
<AW_ID>37534779</AW_ID>
<NAME>John</NAME>
<AGE></AGE>
</MyDataSet>
An example of what it looks like right now:
<MyDataSet>
<ID>8613458</ID>
<AW_ID>37534778</AW_ID>
<NAME>Peter</NAME>
<AGE>22</AGE>
</MyDataSet>
<MyDataSet>
<ID>8613459</ID>
<AW_ID>37534779</AW_ID>
<NAME>John</NAME>
</MyDataSet>
Do you know what I need to do? Thank you for your help!
source
share