0
當我嘗試反序列化的RSS XML的pubdate的元素,使用XmlSerializer的一個RSS XML源的pubdate的元素時,我得到這個錯誤:錯誤反序列化使用XmlSerializer的
An unhandled exception of type 'System.InvalidOperationException' occured in System.Xml.dll
這是I類反序列化使用:
public class RssItem
{
[XmlElement("title")]
public string Title { get; set; }
[XmlElement("description")]
public string Description { get; set; }
[XmlElement("pubDate")]
public DateTime Date { get; set; }
[XmlElement("link")]
public string Link { get; set; }
}
和pubdate的元素具有以下格式:
<pubDate>Sat, 29 Mar 2014 19:27:18 EDT</pubDate>
我究竟做錯了什麼?這個錯誤的解決方案是什麼?