Page 1 of 1
RSS example breaks with other feeds
Posted: Fri Feb 25, 2011 7:19 am
by Jellicle
The RSS example stack on the support pages uses a slashdot feed; I'm getting errors with all other feeds I've tried. Is the example stack hard-wired for that feed?
(BTW I'm brand new to working with RSS/XML. Go easy on me

)
Re: RSS example breaks with other feeds
Posted: Sun May 15, 2011 12:07 am
by Mark
Jellicle,
Got a link to that stack?
Mark
Re: RSS example breaks with other feeds
Posted: Mon Jun 27, 2011 1:05 am
by brains
I also need some help on this.
I have downloaded the stack available on this page: (sorry...for some reason I can't post web links!!!...but it is lesson 19173-Intermediate-RSS-Feeds
I have changed the RSS feed located at the top of the card script and tried it with a BBC feed but no feed appears.
I think it has something to do with the feed format etc and this: revXMLChildNames(tTreeID, "RDF", return, "item", true)
BUT, as a complete noob I could be looking in the wrong direction.
Any help would be appreciated (remember...new to LiveCode)
Many thanks
Re: RSS example breaks with other feeds
Posted: Fri Aug 26, 2011 9:28 am
by DRJ-UK
Just discovered this post.
We had the same problem earlier this year with the tutorial. Delving into the XML feed format for the RSS content was the key for us. The solution proved straightforward in the end - replacing the "RDF" parameter in revXMLChildNames(tTreeID, "RDF", return, "item", true) with "rss/channel".
This will give revXMLChildNames(tTreeID, "rss/channel", return, "item", true) so will happily read through RSS feeds such as those from the BBC.
It would be useful if the tutorial had made some reference to different RSS formats to assist the unwary!
Hope this is helpful and proves worthwhile.
Dave
Re: RSS example breaks with other feeds
Posted: Tue Apr 26, 2016 9:06 pm
by bbhank
Didn't work for me either.

Re: RSS example breaks with other feeds
Posted: Tue Jan 24, 2017 7:30 pm
by mrcoollion
This basic piece of code works for me.
Got the explanation from
http://activethought.net/livecode-server/xml/
Code: Select all
on mouseUp
get url "http://www.nu.nl/rss/Algemeen" // Put here your URL
put it into myXML
put revCreateXMLTree(myXML, false, true, false) into tTree
if tTree is not an integer then
answer "Error with revCreateXMLTree !"
exit mouseUp
end if
--
// we can directly access nodes
put revXMLNodeContents(tTree, "rss/channel/title") && "-" && revXMLNodeContents(tTree, "rss/channel/description") into tTitleAndDescr -- this will out put sites title and description
put tTitleAndDescr & " .... " into RSSText
--
put revXMLChildNames(tTree, "rss/channel/", return, "item", true) into recentPosts
repeat for each line aPost in recentPosts
put revXMLNodeContents(tTree, "rss/channel/" & aPost & "/title") into postTitle
put revXMLNodeContents(tTree, "rss/channel/" & aPost & "/link") into postLink
put postTitle & " .... " after RSSText
end repeat
--
answer RSSText
end mouseUp
See for the complete RSS example with a ticker feed
http://forums.livecode.com/viewtopic.php?f=9&t=28703
Regards,
Paul