VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB.NET Examples

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

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

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

Read RSS Feed

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

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

The Chilkat RSS class/component is freeware.

Dim rss As New Chilkat.Rss()

Dim success As Boolean

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


'  Get the 1st channel.
Dim rssChannel As Chilkat.Rss

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:
TextBox1.Text = TextBox1.Text & "Title: " & rssChannel.GetString("title") & vbCrLf
TextBox1.Text = TextBox1.Text & "Link: " & rssChannel.GetString("link") & vbCrLf
TextBox1.Text = TextBox1.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 Chilkat.Rss
    rssItem = rssChannel.GetItem(i)

    TextBox1.Text = TextBox1.Text & "----" & vbCrLf
    TextBox1.Text = TextBox1.Text & "Title: " _
         & rssItem.GetString("title") & vbCrLf
    TextBox1.Text = TextBox1.Text & "Link: " _
         & rssItem.GetString("link") & vbCrLf
    TextBox1.Text = TextBox1.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
            TextBox1.Text = TextBox1.Text & "    category: " _
                 & rssItem.MGetString("category",j) & vbCrLf
        Next


    End If


Next




 

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

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

Mail Component · XML Parser