Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
XML Compression in Visual BasicSource 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.