VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



VB.NET Examples

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

Byte Array
VB.NET FTPS
System.IO

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

Zip Compress XML Sub-Trees

Download VB.NET Project Files and Source Code

VB.NET sample code showing how to Zip compress sub-trees within an XML document.

    ' Zip the contents of each company record.
    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

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

        Dim b As Boolean
        b = xml.FirstChild2()
        While (b)
            ' Save the company name as an attribute.
            xml.AddAttribute("name", xml.GetChildContent("name"))

            ' Zip the sub-tree.
            xml.ZipTree()

            b = xml.NextSibling2()
        End While

        xml.GetRoot2()
        xml.SaveXml("zipped.xml")

    End Sub


Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 
 

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

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

Mail Component · XML Parser