I’m working with a XML like this:
<ListOfLore>
<q1:Lore xmlns:q1="http://www.rold.com/Data.xsd">
<q1:LoreNumber>15642</q1:LoreNumber>
</q1:Lore>
<q1:Lore xmlns:q1="http://www.rold.com/Data.xsd">
<q1:LoreNumber>15644</q1:LoreNumber>
</q1:Lore>
</ListOfLore>
I’m doing this and I’m getting nothing
var lores = (from ListOfLore in pjs.Descendants("ListOfLore")
from Lore in ListOfLore.Descendants()
where Lore.Name.LocalName == ("Lore")
select Lore);
I want to get all of Lore items from the ListOfLore
As Jon notes, you don’t need the query syntax. The following is shorter and clearer: