1
我有XML,看起來像這樣:查找節點與「失蹤」的屬性
<Doc>
<Thing>
<ID type="One">Fred</ID>
</Thing>
<Thing>
<ID>Bill</ID>
</Thing>
<Thing>
<ID type="Two">John</ID>
</Thing>
</Doc>
我可以寫LINQ找到的類型=「一個」節點。 (或類型=「兩課」)
Dim ThingList As IEnumerable(Of XElement) = _
From el In doc...<Thing>.<ID> _
Where el.Attribute("type").Value = "One" _
Select el
我怎麼會寫LINQ查詢發現,沒有一個類型的屬性在所有的ID的節點?