VB.NET Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

Embed GIF Image in XML

Download Chilkat .NET for 4.0 Framework

Download Chilkat .NET for 64-bit 4.0 Framework (x64)

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 64-bit 2.0 / 3.5 Framework (x64)

Download Chilkat .NET for 1.0 / 1.1 Framework

VB.NET sample code showing how to embed a GIF image in an XML document.

    ' Add a GIF image to the Chilkat company record.
    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

        Dim xml As New Chilkat.Xml()
        xml.LoadXmlFile("companies.xml")

        ' Quickly locate the Chilkat record.
        ' This updates the internal reference to point
        ' to the record that was found.
        Dim zipFlag As Boolean
        Dim aesEncryptFlag As Boolean
        Dim password As String
        zipFlag = False
        aesEncryptFlag = False
        password = ""

        If (xml.SearchForContent2(Nothing, "name", "Chilkat*")) Then

            ' Move up to the record level.
            xml.GetParent2()

            Dim gifNode As Chilkat.Xml
            gifNode = xml.NewChild("gif_image", "")

            ' The data can be optionally Zip compressed and/or AES encrypted.
            gifNode.SetBinaryContentFromFile("dude.gif", zipFlag, aesEncryptFlag, password)

            ' Save the XML with the embedded GIF.
            xml.GetRoot2()
            xml.SaveXml("embeddedGif.xml")

            ' This code extracts the GIF image from the XML
            Dim xml2 As New Chilkat.Xml()
            xml2.LoadXmlFile("embeddedGif.xml")
            xml2.SearchForTag2(Nothing, "gif_image")
            xml2.SaveBinaryContent("dude2.gif", zipFlag, aesEncryptFlag, password)

        End If

    End Sub

 

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

Mail Component · XML Parser