Post by neal on Aug 20, 2013 1:38:05 GMT -5
There should be some code for reading RSS feeds on the Run BASIC Wiki - I think that is where I got this:
xml$ = httpget$(url$)
if xml$ = "" then
html "<p>error fetching feed!</p>"
end
end if
xmlparser #rss, xml$
#channel = #rss #element(1)
#title = #channel #element("title")
#link = #channel #element("link")
#desc = #channel #element("description")
html "<h3><a href='" + #link value$() + "'>" + #title value$() + "</a></h3>"
html "<p>" + #desc value$() + "</p>"
for x = 1 to #channel elementCount()
if (itemCount = maxItems) then exit for
#item = #channel #element(x)
if (#item key$() = "item") then
#title = #item #element("title")
#desc = #item #element("description")
html "<strong><a href='" + #link value$() + "'>" + #title value$() + "</a></strong>"
html "<p>" + #desc value$() + "</p>"
itemCount = itemCount + 1
end if
next x