VBScript Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VBScript Examples

Bounced Mail
Bz2
Character Encoding
Digital Certificates
CSV
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

Read RSS Feed

Sample code showing how to read an RSS feed and display the contents.

The Chilkat RSS class/component is freeware.

Download Chilkat XML ActiveX

Note: The Chilkat XML ActiveX also includes the Chilkat RSS and Atom components.

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

set rss = CreateObject("Chilkat.Rss")

'  Download from the feed URL:
success = rss.DownloadRss("http://blog.chilkatsoft.com/?feed=rss2")
If (success <> 1) Then
    MsgBox rss.LastErrorText
    WScript.Quit
End If

'  Get the 1st channel.

Set rssChannel = rss.GetChannel(0)
If (rssChannel Is Nothing ) Then
    MsgBox "No channel found in RSS feed."
    WScript.Quit
End If

'  Display the various pieces of information about the channel:
outFile.WriteLine("Title: " & rssChannel.GetString("title"))
outFile.WriteLine("Link: " & rssChannel.GetString("link"))
outFile.WriteLine("Description: " & rssChannel.GetString("description"))

'  For each item in the channel, display the title, link,
'  publish date, and categories assigned to the post.
numItems = rssChannel.NumItems

For i = 0 To numItems - 1
    Set rssItem = rssChannel.GetItem(i)

    outFile.WriteLine("----")
    outFile.WriteLine("Title: " & rssItem.GetString("title"))
    outFile.WriteLine("Link: " & rssItem.GetString("link"))
    outFile.WriteLine("pubDate: " & rssItem.GetString("pubDate"))

    numCategories = rssItem.GetCount("category")

    If (numCategories > 0) Then
        For j = 0 To numCategories - 1
            outFile.WriteLine("    category: " _
                 & rssItem.MGetString("category",j))
        Next

    End If

Next


outFile.Close

© 2000-2013 Chilkat Software, Inc. All Rights Reserved.