Here's a link to an example of the rss feed:
http://www.nashvillewraps.com/rss/example-datafeed.xml
and here's an example of my best shot at a query that returns all the data as just a collection of elements:
XDocument doc = XDocument.Load(@"c:\small-datafeed.xml"); XNamespace ns = "http://base.google.com/ns/1.0"; var allElements = from elements in doc.Descendants("item").Descendants() select elements;foreach (var element in allElements) { Console.WriteLine(element.Name+": "+element.Value); Console.WriteLine(); }
If I remove ".Descendants()" from the query, of course I get a collection of "item" elements but those don't have child elements like I would expect (at least not that I can tell). I've not given an example of the Item class/model I'm trying to feed into because I don't think that's necessarily part of the problem. The problem is, how do I query the XML to return a collection of item(s) that contain a collection of elements.
I suspect there's something very basic here that I'm just not seeing.