Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

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

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


VB Strings
VB Byte Array

 

 

 

 

 

 

 

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 rss As New ChilkatRss

Dim success As Long

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

'  Get the 1st channel.
Dim rssChannel As ChilkatRss

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

'  Display the various pieces of information about the channel:
Text1.Text = Text1.Text & "Title: " & rssChannel.GetString("title") & vbCrLf
Text1.Text = Text1.Text & "Link: " & rssChannel.GetString("link") & vbCrLf
Text1.Text = Text1.Text & "Description: " & rssChannel.GetString("description") & vbCrLf

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

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

    Text1.Text = Text1.Text & "----" & vbCrLf
    Text1.Text = Text1.Text & "Title: " & rssItem.GetString("title") & vbCrLf
    Text1.Text = Text1.Text & "Link: " & rssItem.GetString("link") & vbCrLf
    Text1.Text = Text1.Text & "pubDate: " & rssItem.GetString("pubDate") & vbCrLf

    Dim numCategories As Long
    numCategories = rssItem.GetCount("category")
    Dim j As Long
    If (numCategories > 0) Then
        For j = 0 To numCategories - 1
            Text1.Text = Text1.Text & "    category: " _
                 & rssItem.MGetString("category",j) & vbCrLf
        Next

    End If

Next


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