Using LINQ to XML to Process XML in Multiple Namespaces
问题 I'm trying to parse results from the YouTube API. I'm getting the results correctly as a string, but am unable to parse it correctly. I followed suggestions on a previous thread, but am not getting any results. My sample code is: string response = youtubeService.GetSearchResults(search.Term, "published", 1, 50); XDocument xDoc = XDocument.Parse(response, LoadOptions.SetLineInfo); var list = xDoc.Descendants("entry").ToList(); var entries = from entry in xDoc.Descendants("entry") select new {