C# Examples

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

C# Examples

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


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Read RSS Feed

Download: Chilkat .NET Assemblies

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

The Chilkat RSS class/component is freeware.

Chilkat.Rss rss = new Chilkat.Rss();

bool success;

//  Download from the feed URL:
success = rss.DownloadRss("http://blog.chilkatsoft.com/?feed=rss2");
if (success != true) {
    MessageBox.Show(rss.LastErrorText);
    return;
}

//  Get the 1st channel.
Chilkat.Rss rssChannel = null;

rssChannel = rss.GetChannel(0);
if (rssChannel == null ) {
    MessageBox.Show("No channel found in RSS feed.");
    return;
}

//  Display the various pieces of information about the channel:
textBox1.Text += "Title: " + rssChannel.GetString("title") + "\r\n";
textBox1.Text += "Link: " + rssChannel.GetString("link") + "\r\n";
textBox1.Text += "Description: " + rssChannel.GetString("description") + "\r\n";

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

for (i = 0; i <= numItems - 1; i++) {
    Chilkat.Rss rssItem = null;
    rssItem = rssChannel.GetItem(i);

    textBox1.Text += "----" + "\r\n";
    textBox1.Text += "Title: " + rssItem.GetString("title") + "\r\n";
    textBox1.Text += "Link: " + rssItem.GetString("link") + "\r\n";
    textBox1.Text += "pubDate: " + rssItem.GetString("pubDate") + "\r\n";

    int numCategories;
    numCategories = rssItem.GetCount("category");
    int j;
    if (numCategories > 0) {
        for (j = 0; j <= numCategories - 1; j++) {
            textBox1.Text += "    category: "
                 + rssItem.MGetString("category",j) + "\r\n";
        }

    }

}


 

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