回答編集履歴
1
修正
test
CHANGED
@@ -12,19 +12,19 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
namespace ConsoleApp1
|
15
|
+
namespace ConsoleApp1
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
class Program
|
20
16
|
|
21
17
|
{
|
22
18
|
|
23
|
-
|
19
|
+
class Program
|
24
20
|
|
25
21
|
{
|
26
22
|
|
23
|
+
static void Main(string[] args)
|
24
|
+
|
25
|
+
{
|
26
|
+
|
27
|
-
var xml = XDocument.Parse(@"<?xml version=""1.0"" encoding=""utf-8""?>
|
27
|
+
var xml = XDocument.Parse(@"<?xml version=""1.0"" encoding=""utf-8""?>
|
28
28
|
|
29
29
|
<チーム>
|
30
30
|
|
@@ -72,11 +72,13 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
bool isRemoveTarget(XElement element) => element.Elements("要素1").Any(a => a.Value == "検索文字列1");
|
75
|
+
bool isRemoveTarget(XElement element) => element.Elements("要素1").Any(a => a.Value == "検索文字列1");
|
76
76
|
|
77
|
-
foreach (var item in xml.Root.Elements("member").Where(isRemoveTarget)) item.Remove();
|
77
|
+
foreach (var item in xml.Root.Elements("member").Where(isRemoveTarget)) item.Remove();
|
78
78
|
|
79
|
-
Console.WriteLine(xml);
|
79
|
+
Console.WriteLine(xml);
|
80
|
+
|
81
|
+
}
|
80
82
|
|
81
83
|
}
|
82
84
|
|