rewrite MSXML2.DOMDocument to Xml.xmlDocument



I have the following VB function which I need to rewrite for VB.Net (VS2013) I have been breaking my head over this, anyone know how to do this:



Public Function EncodeBase64(ByRef arrData() As Byte) As String

Dim objXML As MSXML2.DOMDocument
Dim objNode As MSXML2.IXMLDOMElement

Set objXML = New MSXML2.DOMDocument

' byte array to base64
Set objNode = objXML.createElement("b64")
objNode.DataType = "bin.base64"
objNode.nodeTypedValue = arrData
EncodeBase64 = objNode.Text

Set objNode = Nothing
Set objXML = Nothing

End Function

No comments:

Post a Comment