C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



C# Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
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...
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Create RSS Feed in C#

This C# example demonstrates how to create an RSS feed from scratch using the Tortuga RSS .NET component (refer to http://www.worldwideweb-x.com/openData.html)

// This example demonstrates how to create an RSS feed from scratch.
Tortuga.Rss rss = new Tortuga.Rss();

// We need a channel...
Tortuga.Rss channel = rss.AddNewChannel();

// Fill in our channel information:
channel.SetString("title","My RSS Feed");
channel.SetString("link","http://news.mygreatfeed.com/news");
channel.SetString("description","Top Stories in my Super-Duper News Feed");
channel.SetString("generator","Tortuga RSS");
channel.SetString("language","en");
channel.SetString("copyright"," 2005 MyGreatFeed");
channel.SetString("webMaster","news-feedback@mygreatfeed.com");
channel.SetDateNow("pubDate");
channel.SetDateNow("lastBuildDate");

// How about an image?
Tortuga.Rss image = channel.AddNewImage();
image.SetString("title","My Great News");
image.SetString("url","http://www.mygreatfeed.com/news.gif");
image.SetString("link","http://www.mygreatfeed.com/");

// Add an item.
Tortuga.Rss item = channel.AddNewItem();
item.SetString("title","Yahoo! Cooperates with Oppressive Chinese Regime");
String descrip = "Yahoo! passes information to the Chinese government to help convict a Chinese dissident. " +
    "Journalist Shi Tao is serving a 10-year prison sentence for revealing \"state secrets\".";
item.SetString("description",descrip);
item.SetString("link","http://www.mygreatfeed.com/ShiTao.html");
item.SetString("guid","d78192a8");
item.SetAttr("guid","isPermaLink","false");
item.SetDateNow("pubDate");

// Add another item.
item = channel.AddNewItem();
item.SetString("title","Clinton Neglects to Help Dissident Exposed by Yahoo!");
String descrip2 = "Former President Clinton fails to speak out for Shi Tao or defend freedom of speech on the Internet. ";
item.SetString("description",descrip2);
item.SetString("link","http://www.mygreatfeed.com/ClintonWeenie.html");
item.SetString("guid","d78192a9");
item.SetAttr("guid","isPermaLink","false");
item.SetDateNow("pubDate");

// Now get the complete XML for the RSS feed:
textBox1.Text = rss.ToXmlString();

Important: The download for this example does not contain the TortugaDN.dll which
must be downloaded and installed separately at http://www.worldwideweb-x.com/tortugaDownload.html.
Once installed, add a reference to the DLL in the project

 

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

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

Email Component · XML Parser