可能重复:
LINQ TO XML, How to replace values with new values c#LINQ到XML如何更新值
<BasicImport xmlns="http://www.uk.nds.com/SSR/XTI/Traffic/0010" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.uk.nds.com/SSR/XTI/Traffic/0010 0010.xsd" utcOffset="+05:30" frameRate="25">
<SiEventSchedule deleteStart="2012/01/21 00:00:00" deleteEnd="2012/01/21 23:59:59">
<siService>Saman</siService>
<playoutSource>Saman</playoutSource>
<activationSourceId>0</activationSourceId>
<CaSchedule deleteStart="2012/01/21 00:00:00" deleteEnd="2012/01/21 23:59:59" />
<SiEvent>
<displayDateTime>2012/01/21 00:00:00</displayDateTime>
<activationDateTime>2012/01/21 00:00:00</activationDateTime>
<displayDuration>00:30:00</displayDuration>
<siTrafficKey> 056049263</siTrafficKey>
<detailKey>056049263 2012-07-12</detailKey>
</SiEvent>
</SiEventSchedule>
<BasicImport>
我只是想取代<displayDateTime>
节点的日期值。请注意,我不想更改此节点的时间值... 请在此帮助C#代码
请问您有在这个还没有任何企图?如果你有一个试图做你想做的事情的代码样本,并且你可以指明代码不工作的方式,那么它会容易得多。 – David 2012-07-24 20:47:49
为什么你发布两次[相同的问题](http://stackoverflow.com/questions/11637263/linq-to-xml-how-to-replace-values-with-new-values-c-sharp)? [Jon Skeet的答案]是什么问题(http://stackoverflow.com/questions/11637263/linq-to-xml-how-to-replace-values-with-new-values-c-sharp)?你不喜欢什么? – 2012-07-24 20:54:15
它正在取代完整的Node值。我只想要更新日期值... – Saman 2012-07-24 20:57:04