サンプルXMLファイル
<SiEventSchedule deleteStart="2012/01/21 00:00:00" deleteEnd="2012/01/21 23:59:59">
</SiEventSchedule>
コード:
var el = doc.Descendants(ns + "SiEventSchedule").Select(x => x.Attribute("deleteStart").Value).First();
string[] s = el.ToString().Split(' ');
s[0] = today.ToString("yyyy/MM/dd");
String s5 = String.Join(" ", s);
el.Replace(el, s5); // This line is not working
コードの最後の行だけが機能しておらず、他のすべてが機能しています。誰かがこの値を更新する方法を提案できますか?
<SiEventSchedule deleteStart="2012/01/21 00:00:00" deleteEnd="2012/01/21 23:59:59">
</SiEventSchedule>