Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB 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
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA


VB Strings
VB Byte Array

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

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

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

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