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
(Xojo Plugin) Read RSS FeedSample code showing how to read an RSS feed and emit the contents.
Dim rss As New Chilkat.Rss // Download from the feed URL: Dim success As Boolean success = rss.DownloadRss("http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml") If (success <> True) Then System.DebugLog(rss.LastErrorText) Return End If // Get the 1st channel. Dim rssChannel As Chilkat.Rss rssChannel = rss.GetChannel(0) If (rss.LastMethodSuccess = False) Then System.DebugLog("No channel found in RSS feed.") Return End If // Display the various pieces of information about the channel: System.DebugLog("Title: " + rssChannel.GetString("title")) System.DebugLog("Link: " + rssChannel.GetString("link")) System.DebugLog("Description: " + rssChannel.GetString("description")) // For each item in the channel, display the title, link, // publish date, and categories assigned to the post. Dim numItems As Int32 numItems = rssChannel.NumItems Dim i As Int32 For i = 0 To numItems - 1 Dim rssItem As Chilkat.Rss rssItem = rssChannel.GetItem(i) System.DebugLog("----") System.DebugLog("Title: " + rssItem.GetString("title")) System.DebugLog("Link: " + rssItem.GetString("link")) System.DebugLog("pubDate: " + rssItem.GetString("pubDate")) Dim numCategories As Int32 numCategories = rssItem.GetCount("category") Dim j As Int32 If (numCategories > 0) Then For j = 0 To numCategories - 1 System.DebugLog(" category: " + rssItem.MGetString("category",j)) Next End If Next |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.