By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,264 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,264 IT Pros & Developers. It's quick & easy.

base64 encoding

P: n/a
In Visual Basic 6 I could take a value from the database and create a byte
array. I could then take the byte array and place it into an Xml document
and specify the datatype of the node as bin.base64. Can anyone tell me how
to accomplish this in Visual Studio .Net 2005?
Sample VB6 code.

Set objElement = objDOMDocument.createNode("Element",
"MessageData", "")
ByteData() =
recordset!MessageData.GetChunk(recordset!MessageDa ta.ActualSize)
objElement.dataType = "bin.base64"
objElement.nodeTypedValue = ByteData()
objChildNode.appendChild objElement
Thanks in advance
May 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Loren Dummer wrote:
In Visual Basic 6 I could take a value from the database and create a byte
array. I could then take the byte array and place it into an Xml document
and specify the datatype of the node as bin.base64. Can anyone tell me how
to accomplish this in Visual Studio .Net 2005?
Sample VB6 code.

Set objElement = objDOMDocument.createNode("Element",
"MessageData", "")
ByteData() =
recordset!MessageData.GetChunk(recordset!MessageDa ta.ActualSize)
objElement.dataType = "bin.base64"
objElement.nodeTypedValue = ByteData()
objChildNode.appendChild objElement


AFAIK there is no such functionality in .NET. Instead you can encode
your bytes in Base64 using Convert.ToBase64String() method and store
them in XmlDocument.

--
Oleg Tkachenko [XML MVP, MCAD]
http://www.XmlLab.Net | http://www.XLinq.Net | http://blog.tkachenko.com
May 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.