RSS = {}; function RSS.OpenURL(URL, Timeout, Port) assert(type(URL) == "string", "Argument 1 must be type string."); local Timeout = Timeout; local Port = Port; if not (Timeout) then Timeout = 5; end if not (Port) then Port = 80; end File.Delete(_TempFolder.."\\~tmp.atom"); HTTP.Download(URL, _TempFolder.."\\~tmp.atom", 1, Timeout, Port); if (File.DoesExist(_TempFolder.."\\~tmp.atom") and Application.GetLastError() ~= 0) then return Application.GetLastError(); end XML.Load(_TempFolder.."\\~tmp.atom"); if (Application.GetLastError() ~= 0) then return Application.GetLastError(); end return 0; end function RSS.GetFeedInformation() return {Title = XML.GetValue("rss/channel/title"), Link = XML.GetValue("rss/channel/link"), Description = XML.GetValue("rss/channel/description"), Language = XML.GetValue("rss/channel/language"), Generator = XML.GetValue("rss/channel/generator"), LastBuildDate = XML.GetValue("rss/channel/lastBuildDate")}; end function RSS.GetItems() local Items = {}; for Index = 1, XML.Count("rss/channel", "item") do Items[Index] = {}; Items[Index].Title = XML.GetValue("rss/channel/item:"..tostring(Index).."/title"); Items[Index].Link = XML.GetValue("rss/channel/item:"..tostring(Index).."/link"); Items[Index].PublishDate = XML.GetValue("rss/channel/item:"..tostring(Index).."/pubDate"); Items[Index].Description = XML.GetValue("rss/channel/item:"..tostring(Index).."/description"); Items[Index].Category = XML.GetValue("rss/channel/item:"..tostring(Index).."/category"); end return Items; end