Visual Basic Examples

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

VB Examples

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

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


VB Strings
VB Byte Array

 

 

 

 

 

 

 

XML Compression in Visual Basic

Download Chilkat XML ActiveX

Source Code Listing

' Compress a single XML node's content using Zip compression.
' Compression is in-place and done in-memory. 
Private Sub Command1_Click()
    Dim xml As ChilkatXml
    Set xml = New ChilkatXml
    success = xml.LoadXmlFile("test.xml")
    xml.CompressNode
    xml.SaveXml "testCompressed.xml"
End Sub

' Decompress a single XML node's content.
Private Sub Command2_Click()
    Dim xml As ChilkatXml
    Set xml = New ChilkatXml
    success = xml.LoadXmlFile("testCompressed.xml")
    xml.DecompressNode
    xml.SaveXml "testDecompressed.xml"
End Sub

' Compress an entire XML subtree using Zip compression.
' Compression is in-place and done in-memory. 
Private Sub Command3_Click()
    Dim xml As ChilkatXml
    Set xml = New ChilkatXml
    success = xml.LoadXmlFile("testTree.xml")
    xml.CompressSubtree
    xml.SaveXml "testCompressedTree.xml"
End Sub

' Decompress and restore an entire XML subtree.
Private Sub Command4_Click()
    Dim xml As ChilkatXml
    Set xml = New ChilkatXml
    success = xml.LoadXmlFile("testCompressedTree.xml")
    xml.DecompressSubtree
    xml.SaveXml "testDecompressedTree.xml"
End Sub

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