Hi,
I went through Beth Massi's LINQ to XML tutorial, where she queries a Customers.xml file (if any of you know it). I saved an Atom feed as an XML file on my computer and I tried querying it in a similar fashion but it never returns anything. Please excuse the formatting, I've tried to tidy it up but it's just not working
I'm kind of confused, because I saved the BBC News' RSS feed to an XML file and I am able to query it perfectly fine using the almost the same code as above (except I query for the item node and not the entry node).
Can anyone see what I'm doing wrong in my query?
Thanks
Cossie
I went through Beth Massi's LINQ to XML tutorial, where she queries a Customers.xml file (if any of you know it). I saved an Atom feed as an XML file on my computer and I tried querying it in a similar fashion but it never returns anything. Please excuse the formatting, I've tried to tidy it up but it's just not working
VB.NET:
Dim myAtom = XDocument.Load("C:\atom.xml")
Dim atomQuery = <atomQuery>
<%= From aq In myAtom...<entry> _
Select aq %>
</atomQuery>
' This line is from her tutorial
My.Computer.FileSystem.WriteAllText("atomQuery.xml", atomQuery.ToString, False)
' As is this one
Process.Start("atomQuery.xml")
I'm kind of confused, because I saved the BBC News' RSS feed to an XML file and I am able to query it perfectly fine using the almost the same code as above (except I query for the item node and not the entry node).
VB.NET:
Dim myNews = XDocument.Load("C:\bbc.xml")
Dim items = <items>
<%= From n In myNews...<item> _
Select n %>
</items>
...
...
Can anyone see what I'm doing wrong in my query?
Thanks
Cossie