Cor Ligthert said:
Normally is setting nothing (not the word however really nothing) between
the tags the same as DBnull.value(null).
Hmm... I'd be surprised if that were the case for a string column,
although I can't say I've used XML dataset representation enough to
know for sure. I'd expect that to represent an empty string, rather
than a null value, if you see what I mean. (For non-string columns it
would be okay, of course.)
From a quick test (and it *is* only a quick test) it looks to me like
(for string columns at least) when you use WriteXml, null columns
aren't written at all, whereas empty columns are written with tags with
no content. In other words, the XML:
<NewDataSet>
<Foo>
<Baz>x</Baz>
</Foo>
<Foo>
<Bar />
<Baz>y</Baz>
</Foo>
</NewDataSet>
has one row with Baz="x", Bar=DBNull.Value, and one row with Baz="y"
and Bar="".