FoxPro Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual FoxPro Examples

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

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

Non-Chilkat Links
Text and String Handling

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.

LOCAL loRss
LOCAL lnSuccess
LOCAL loRssChannel
LOCAL lnNumItems
LOCAL i
LOCAL loRssItem
LOCAL lnNumCategories
LOCAL j

loRss = CreateObject('Chilkat.Rss')

*  Download from the feed URL:
lnSuccess = loRss.DownloadRss("http://blog.chilkatsoft.com/?feed=rss2")
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loRss.LastErrorText)
    QUIT
ENDIF

*  Get the 1st channel.

loRssChannel = loRss.GetChannel(0)
IF (loRssChannel = NULL ) THEN
    =MESSAGEBOX("No channel found in RSS feed.")
    QUIT
ENDIF

*  Display the various pieces of information about the channel:
? "Title: " + loRssChannel.GetString("title")
? "Link: " + loRssChannel.GetString("link")
? "Description: " + loRssChannel.GetString("description")

*  For each item in the channel, display the title, link,
*  publish date, and categories assigned to the post.

lnNumItems = loRssChannel.NumItems

FOR i = 0 TO lnNumItems - 1

    loRssItem = loRssChannel.GetItem(i)

    ? "----"
    ? "Title: " + loRssItem.GetString("title")
    ? "Link: " + loRssItem.GetString("link")
    ? "pubDate: " + loRssItem.GetString("pubDate")

    lnNumCategories = loRssItem.GetCount("category")

    IF (lnNumCategories > 0) THEN
        FOR j = 0 TO lnNumCategories - 1
            ? "    category: " + loRssItem.MGetString("category",j)
        NEXT

    ENDIF

    RELEASE loRssItem
NEXT

RELEASE loRssChannel

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

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

Mail Component · .NET Email Component · ASP Mail Component · XML Parser