BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XML DOM
Chilkat XML
Import and Export Microsoft Outlook items to XML using MSXML
A MsXML Wrapper class for VC++
Processing Large XML Documents
CSV to XML using the DOM
XML DOM: Inserting, Modifying and Deleting elements using VBScript
XML DOM: Adding an Child Element and an attribute using VBScript
Combining XML Documents using XSLT - a collection of 5 approaches
How to use InsertAfter() with XmlDocument?
How to remove xml elements using RemoveChild() with XmlDocument?
How to select specific nodes in XmlDocument() when having a namespace ?
How to Load a XML From a String with XmlDocument?
How to remove an attribute with XmlDocument and RemoveAll?
How to create a navigator with XmlDocument and CreateNavigator?
Whats the 'push model'?
Hybrid Model Part Two: Choosing between SAX and DOM


 
 

<< XHTMLXmlSerializer >>


By Shamil Salakhetdinov
First Posted 01/16/2002
Times viewed 1725

MXSML based class module to perform Base64 encoding and decoding


This post contains attachments
v20020116174746.zip 

Summary This code snippet presents VB6's class module to perform base64 encoding and decoding using MSXML.

Using code from this short article you can easily do the following:

 - Perform base64 encoding
 - Perform base64 decoding
 - Perform conversion of a byte array to the string
 - Perform conversion of a scalar variable to the byte array

Base64 encoding/decoding becomes as easy as ABC:

  Dim o As CBase64   ' base64 encoder/decoder class
  Dim strSrc As String  ' source test string
  Dim strDst As String  ' destination (base64 encoded) test string
  Dim strRes As String  ' restored (base64 decoded) strDst

  strSrc = Test string                 ' set value for test string
  Set o = New CBase64             ' create new instance on CBase64 class
  strDst = o.Encode(strSrc)         ' encode
  strRes = o.Decode2Str(strDst)  ' decode

In attachment you can find a test VB6 project.

Enjoy!

 

Additional information


Rate this article on a scale of 1 to 10 (1 votes, average 8)

Your vote :  

<< XHTMLXmlSerializer >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML