var summary = member.Select(o => o.Element("summary"))
.FirstOrDefault();
代碼這給像
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1" />.
</summary>
值當我試圖從價值總結如summary.value
它只給出值
獲取包含在元素的數量。
的部分<see cref="T:System.Collections.Generic.ICollection
1" />`在該字符串不來了。
請在解決這個幫助。
抓獲調試。
UPDATE
我試圖逃離按評論
var summary = member.Select(o => o.XPathSelectElement("summary").Value.Replace("<", "<").Replace("&", "&").Replace(">", ">"))
.FirstOrDefault();
還是同樣的結果。可能是我做錯了什麼。
你應該逃脫值事先與''<爲'<'和''>爲'>'和''&爲'&' – Icepickle
如何改善這個問題。向下選民請建議。 – shanmugharaj
你可以指出你的xml是如何構建的,如果xml內容已經被轉義了(你可以檢查是否用記事本而不是xml查看器,如果有問題的文件有格式錯誤的xml(例如:<< '<') – Icepickle