VBScript Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VBScript Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
PFX
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
POP3
SMTP
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

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

Need a specific example? Send a request to support@chilkatsoft.com

© 2003-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · XML Parser