2009-12-23 137 views
0

我正在嘗試處理rss url,但給我一個錯誤,因爲 「' - '是一個意外的標記,期望的標記是'>',第81行,第5行。RSS訂閱源中的意外標記

當我看到它在xml節點中間有一個價值「Knowledge @ Wharton - Innovation and Entrepreneurship」的價值時。

我該如何處理這個URL並忽略這個錯誤。

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 

回答