C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

C# Examples

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


More Examples...
Email Object
POP3
SMTP
RSS
Atom
String
Byte Array
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
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 .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

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";
        }

    }

}


 

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

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

Email Component · XML Parser