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
(AutoIt) Read RSS FeedSample code showing how to read an RSS feed and emit the contents.
$oRss = ObjCreate("Chilkat.Rss") ; Download from the feed URL: Local $bSuccess = $oRss.DownloadRss("http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml") If ($bSuccess <> True) Then ConsoleWrite($oRss.LastErrorText & @CRLF) Exit EndIf ; Get the 1st channel. Local $oRssChannel = $oRss.GetChannel(0) If ($oRss.LastMethodSuccess = False) Then ConsoleWrite("No channel found in RSS feed." & @CRLF) Exit EndIf ; Display the various pieces of information about the channel: ConsoleWrite("Title: " & $oRssChannel.GetString("title") & @CRLF) ConsoleWrite("Link: " & $oRssChannel.GetString("link") & @CRLF) ConsoleWrite("Description: " & $oRssChannel.GetString("description") & @CRLF) ; For each item in the channel, display the title, link, ; publish date, and categories assigned to the post. Local $iNumItems = $oRssChannel.NumItems Local $i For $i = 0 To $iNumItems - 1 Local $oRssItem = $oRssChannel.GetItem($i) ConsoleWrite("----" & @CRLF) ConsoleWrite("Title: " & $oRssItem.GetString("title") & @CRLF) ConsoleWrite("Link: " & $oRssItem.GetString("link") & @CRLF) ConsoleWrite("pubDate: " & $oRssItem.GetString("pubDate") & @CRLF) Local $iNumCategories = $oRssItem.GetCount("category") Local $iJ If ($iNumCategories > 0) Then For $iJ = 0 To $iNumCategories - 1 ConsoleWrite(" category: " & $oRssItem.MGetString("category",$iJ) & @CRLF) Next EndIf Next |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.