0

I'm serializing DataSet using GetXmlSchema() and GetXml() methods (code below), but in schema and xmlData there is no xsi:nil or nillable attributes for columns which are nullable. When deserializing how could I know that column is nullable?

XElement schema = XElement.Parse(dataSet.GetXmlSchema());
XElement xmlData = XElement.Parse(dataSet.GetXml());

Is there any way to get those attributes in serialized xml?

Anatolii Gabuza
  • 6,184
  • 2
  • 36
  • 54

1 Answers1

0

http://msdn.microsoft.com/en-us/library/ybce7f69%28v=vs.100%29.aspx

Looks like you may need to be using XMLSerializer.

Also if a non-nullable type (int for example) has a nil=true it looks like it'll throw an error. That's on the referenced page.

Tyler W
  • 472
  • 1
  • 6
  • 21