我试图提取<str>
标签从内容:XML内容提取C#
<lst name="Stack">
<lst name="Overflow">
<arr name="content">
<str>Help</str>
</arr>
</lst>
</lst>
的代码。我正在使用C#是:
txtResponse.Text += xDoc.Descendants("lst")
.Where(f => (string) f.Attribute("name") == "Overflow")
.Descendants("arr")
.Descendants("str")
.Select(b => b.Value);
但它返回到我
System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String]
什么是我的问题?
已经有您以前的问题的答案:http://stackoverflow.com/questions/18462349/parsing-xml- content-c-sharp – MarcinJuraszek
上一个问题是类似的,但有细微的差别 –