可能重复:
LINQ TO XML,如何用新值替换值 c#
<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# 代码中提供帮助