Possible Duplicate:
What is the correct way to represent null XML elements?
Is there a standard way to represent null attribute values in XML?
We have an existing XML format that expects fragments similar to:
<items>
<item key="key_goes_here" value="value_goes_here" />
...
</items>
The original format didn't anticipate the need to distinguish between a null value and an empty string value -- however, that is important (now).
My gut says to create a new format that avoids attributes for nullable values, and use elements for them instead:
<items>
<item key="key_goes_here_and_is_never_null">
<value xsi:nil="true" />
</item>
</items>
That said, I'd rather keep attributes if there's a standard way to represent null attribute values in XML.