1
如果我有以下XML,我將如何使用LINQ to XML消除每個視頻節點中的日期字段?我想在單元測試中進行比較。LINQ to XML選擇/更新
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<main>
<videos>
<video>
<id>00000000-0000-0000-0000-000000000000</id>
<title>Video Title</title>
<videourl>http://sample.com</videourl>
<thumbnail>http://sample.com</thumbnail>
<dateCreated>2011-01-12T18:54:56.7318386-05:00</dateCreated>
<dateModified>2011-02-12T18:54:56.7318386-05:00</dateModified>
<Numbers>
<Number>28</Number>
<Number>78</Number>
</Numbers>
</video>
<video>
<id>00000000-0000-0000-0000-000000000000</id>
<title>Video Title</title>
<videourl>http://sample.com</videourl>
<thumbnail>http://sample.com</thumbnail>
<dateCreated>2011-01-12T18:54:56.7318386-05:00</dateCreated>
<dateModified>2011-02-12T18:54:56.7318386-05:00</dateModified>
<Numbers>
<Number>28</Number>
<Number>78</Number>
</Numbers>
</video>
</videos>
請再次格式化您的代碼,我看不到XML但純文本。 – xandy 2011-01-13 00:45:29