I am trying to process an rss url, but is giving me an error as " -- is an unexpected token. The expected token is > . Line 81, position 5."
当看来文方时,它在xml node中值“Knowledge@Wharton——创新和创业”。
如何处理这一ur,忽视这一错误。
Public Shared Function HasRssItems() As Boolean
Dim myRequest As WebRequest
Dim myResponse As WebResponse
Try
myRequest = System.Net.WebRequest.Create("http://www.google.com/reader/shared/i.am.muralibala")
myRequest.Timeout = 5000
myResponse = myRequest.GetResponse()
Dim rssStream As Stream = myResponse.GetResponseStream()
Dim rssDoc As New XmlDocument()
rssDoc.Load(rssStream)
Return rssDoc.SelectNodes("rss/channel/item").Count > 0
Catch ex As Exception
Return False
Finally
myResponse.Close()
End Try
End Function