c#: xdocument and reading xsi:nil="true" gives "String was not recognized as a valid DateTime"
- by DingoCC
Happily reading xml with
var q2 = from c in xmlDoc.Descendants("Ticket")
select new
{ Responded_Date = (DateTime)c.Element("Responded_Date") }
However when the tag is
<Responded_Date xsi:nil="true" />
I get "String was not recognized as a valid DateTime". I don't wish to use the null coalescing operator but simply to take the null and insert into datatable