-- Description : Extract BBC News Headlines (or probably any other rss), display as a menu on you phone -- Requires : XMLTools2 (http://www.latenightsw.com/freeware/XMLTools2/) -- Author : David Wright property titles : {} property stories : {} set menu_title to "BBC News" set rss_url to "http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml" set theXMLSource to do shell script "curl " & rss_url set theXML to parse XML theXMLSource on parse_rss_doc(rss_doc) repeat with xml_el in XML contents of rss_doc if XML tag of xml_el is "item" parse_rss_item(xml_el) end end repeat end parse_rss_doc on parse_rss_item(rss_item) repeat with xml_el in XML contents of rss_item if XML tag of xml_el is "title" set titles to titles & (XML contents of xml_el) else if XML tag of xml_el is "description" set stories to stories & (XML contents of xml_el) end end repeat end parse_rss_item -- extract the top-level element repeat with xml_el in XML contents of theXML if XML tag of xml_el is "channel" -- and parse it parse_rss_doc(xml_el) exit repeat end end repeat try tell application "SEC Helper" enter list mode items titles title menu_title end tell on error beep end try on item_was_selected(itemIndex) try tell application "SEC Helper" enter messagebox mode title (item itemIndex of titles) text ((item itemIndex of titles) & (" - ") & (item itemIndex of stories)) end tell on error beep end try end item_was_selected