asp.net - Declaration Expected xmlDoc.Load() -


i trying read rss feed , trying use following code so. line xmldoc.load(rssstream) returns following error when try run page through visual studio:

declaration expected

i led believe wrong vb.net syntax on line, can't figure out issue be.

<script runat="server">     dim rq webrequest=webrequest.create("feedurl")    dim response webresponse=rq.getresponse()    dim rssstream stream =response.getresponsestream()    dim xmldoc xmldocument=new xmldocument()     xmldoc.load(rssstream)     dim xmlnodelist xmlnodelist = xmldoc.selectnodes("/channel/item/title | /channel/item/link") </script> 

you might want consider using xelement.load("feedurl") , linq xml rather xml dom manipulate it. alternatively, can use syndicationfeed methods in wcf more typed access rss. discuss both solutions @ my blog.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -