linq를 사용하여 rss 피드를 추출하려고합니다. 생각은 간단하지만 노드가 반환되지 않습니다. 아마 채널/항목 노드로 가야하지만 어떻게해야할지 모르겠다.rss feed by linq
Dim rssUrl As String = "http://webclip.in/rss.aspx?u=mostliked"
Dim rssDoc As XDocument = XDocument.Load(rssUrl)
Dim rssResultSet = From node In rssDoc.Descendants("item") _
Select New With { _
.title = node.Element("title").Value, _
.link = node.Element("link").Value, _
.description = node.Element("description").Value, _
.pubDate = Date.Parse(node.Element("pubdate").Value) _
}
DataGridView1.DataSource = rssResultSet
코드에 어떤 오류/문제점이 있습니까? ur 코드의 두 번째 줄은 XDocument 객체에 RSS xml을 제공해야합니다. – Perpetualcoder
두 번째 줄까지 잘 작동합니다. rssDoc.Descendants ("item")에 액세스 할 수 없습니다. 오류를 만나실 수 없습니다. – vamsivanka