\'. Line 81, position 5.\"" />
开发者

unexpected token in rss feed

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."

when i look at the source it has a value "Knowledge@Wharton -- Innovation and Entrepreneurship" in the middle of the xml node.

How can i process this url and ignore that error.

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.开发者_StackOverflow社区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


That page isn't a XML source; you should to use http://www.google.com/reader/public/atom/user/02179771748407903760/state/com.google/broadcast

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜