I am designing an XML schema to hold the output of my program. However, I am hesitating concerning a design decision, and I would like the input of more experienced programmers.
If I have a complex element
<list>
<elmt>1</elmt>
<elmt>2</elmt>
</list>
However, the nested elements in <list>
are optional. My question is how should the file look like when no <elmt>
exist?
Option 1:
<list/>
or
<list></list>
Option 2:
<list size="0" />
Option 3:
Remove the element <list>
altogether.
I know that these 3 options may not have any difference, but does someone have any preference for some reason (I care more about faster reading of the XML file and easier programming than size)?