質問編集履歴
1
xml内のメンバーをmemberに変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,26 +12,26 @@
|
|
12
12
|
-------------------------------------------
|
13
13
|
<?xml version="1.0" encoding="utf-8"?>
|
14
14
|
<チーム>
|
15
|
-
<
|
15
|
+
<member>
|
16
16
|
<要素1>検索文字列1</要素1>
|
17
17
|
<要素2>bbb</要素2>
|
18
18
|
<要素1>ccc</要素1>
|
19
|
-
</
|
19
|
+
</member>
|
20
|
-
<
|
20
|
+
<member>
|
21
21
|
<要素1>検索文字列2</要素1>
|
22
22
|
<要素2>bbb</要素2>
|
23
23
|
<要素1>ccc</要素1>
|
24
|
-
</
|
24
|
+
</member>
|
25
|
-
<
|
25
|
+
<member>
|
26
26
|
<要素1>検索文字列3</要素1>
|
27
27
|
<要素2>bbb</要素2>
|
28
28
|
<要素1>ccc</要素1>
|
29
|
-
</
|
29
|
+
</member>
|
30
|
-
<
|
30
|
+
<member>
|
31
31
|
<要素1>検索文字列4</要素1>
|
32
32
|
<要素2>bbb</要素2>
|
33
33
|
<要素1>ccc</要素1>
|
34
|
-
</
|
34
|
+
</member>
|
35
35
|
</チーム>
|
36
36
|
|
37
37
|
【実行したい内容】
|
@@ -53,7 +53,7 @@
|
|
53
53
|
|
54
54
|
IEnumerable<string> infos = from item in xdoc.Elements("member")
|
55
55
|
where item.Element("要素1").Value == "検索文字列1"
|
56
|
-
select item.Element("要素
|
56
|
+
select item.Element("要素1").Value;
|
57
57
|
|
58
58
|
foreach(XmlElemnt elemnt in infos)
|
59
59
|
{
|