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
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

Non-Chilkat Links
Text and String Handling

Saving and Retrieving Data in XML

Saving and retrieving data in XML.

Download Chilkat Email ActiveX

Download Chilkat XML ActiveX

Download Chilkat IMAP ActiveX

LOCAL loXml
LOCAL lnSuccess
LOCAL loXml2
LOCAL loEmail
LOCAL lcToName
LOCAL lcToAddr


*  Create an XML file with data that will later be loaded and
*  accessed by field name:
loXml = CreateObject('Chilkat.Xml')
loXml.Tag = "emailData"

loXml.NewChild2("from","admin@chilkatsoft.com")
loXml.NewChild2("toName","Chilkat Support")
loXml.NewChild2("toAddr","support@chilkatsoft.com")
loXml.NewChild2("subject","This is a test")
loXml.NewChild2("body","This is an email body")

*  Save the XML:

lnSuccess = loXml.SaveXml("emailData.xml")
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loXml.LastErrorText)
    QUIT
ENDIF

loXml2 = CreateObject('Chilkat.Xml')

*  Load the XML file:
lnSuccess = loXml2.LoadXmlFile("emailData.xml")
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loXml2.LastErrorText)
    QUIT
ENDIF

*  Access the data by name
? loXml2.GetChildContent("from")
? loXml2.GetChildContent("toName")
? loXml2.GetChildContent("toAddr")
? loXml2.GetChildContent("subject")
? loXml2.GetChildContent("body")
? "------"

*  Let's say I want to load this into an email object:
loEmail = CreateObject('Chilkat.Email2')

loEmail.From = loXml2.GetChildContent("from")

lcToName = loXml2.GetChildContent("toName")
lcToAddr = loXml2.GetChildContent("toAddr")
loEmail.AddTo(lcToName,lcToAddr)
loEmail.Subject = loXml2.GetChildContent("subject")
loEmail.Body = loXml2.GetChildContent("body")

? loEmail.GetMime()


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