Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Lianja) Read RSS FeedSample code showing how to read an RSS feed and emit the contents.
loRss = createobject("CkRss") // Download from the feed URL: llSuccess = loRss.DownloadRss("http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml") if (llSuccess <> .T.) then ? loRss.LastErrorText release loRss return endif // Get the 1st channel. loRssChannel = loRss.GetChannel(0) if (loRss.LastMethodSuccess = .F.) then ? "No channel found in RSS feed." release loRss return endif // Display the various pieces of information about the channel: ? "Title: " + loRssChannel.GetString("title") ? "Link: " + loRssChannel.GetString("link") ? "Description: " + loRssChannel.GetString("description") // For each item in the channel, display the title, link, // publish date, and categories assigned to the post. lnNumItems = loRssChannel.NumItems for i = 0 to lnNumItems - 1 loRssItem = loRssChannel.GetItem(i) ? "----" ? "Title: " + loRssItem.GetString("title") ? "Link: " + loRssItem.GetString("link") ? "pubDate: " + loRssItem.GetString("pubDate") lnNumCategories = loRssItem.GetCount("category") if (lnNumCategories > 0) then for j = 0 to lnNumCategories - 1 ? " category: " + loRssItem.MGetString("category",j) next endif release loRssItem next release loRssChannel release loRss |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.