FoxPro Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual FoxPro Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
Socket
Spider
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
DKIM / DomainKey
NTLM
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
FileAccess
Bzip2
LZW

 

Non-Chilkat Links
Text and String Handling

Load file into XML as Base64 Encoded Content

Loads any type file into an XML document. The file content is encoded as base64.

Download Chilkat XML ActiveX

LOCAL loDocRoot
LOCAL lnSuccess
LOCAL lnZipContent
LOCAL lnEncryptContent
LOCAL lcEncryptPassword
LOCAL loPdfNode
LOCAL lnUnzipContent
LOCAL lnDecryptContent
LOCAL lcDecryptPassword

loDocRoot = CreateObject('Chilkat.Xml')

loDocRoot.Tag = "myDoc"

*  To zip compress the content, set this flag to 1

lnZipContent = 0
*  To 128-bit AES encrypt the content, set this flag to 1

lnEncryptContent = 0

lcEncryptPassword = ""

loPdfNode = loDocRoot.NewChild("pdf","")

*  Embed a PDF into XML
lnSuccess = loPdfNode.SetBinaryContentFromFile("sample.pdf",lnZipContent,lnEncryptContent,lcEncryptPassword)
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loPdfNode.LastErrorText)
    RELEASE loPdfNode
    QUIT
ENDIF

=MESSAGEBOX(loPdfNode.LastErrorText)

*  Display the entire XML document:
? loDocRoot.GetXml()

*  Get the Base64-encoded content and display it:
? loPdfNode.Content

*  Extract the binary content from XML:

lnUnzipContent = 0

lnDecryptContent = 0

lcDecryptPassword = ""
lnSuccess = loPdfNode.SaveBinaryContent("out.pdf",lnUnzipContent,lnDecryptContent,lcDecryptPassword)
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loPdfNode.LastErrorText)
    RELEASE loPdfNode
    QUIT
ENDIF

RELEASE loPdfNode
=MESSAGEBOX("Success!")

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

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

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