Hi, <BR><BR>I have a problem. I am trying to send an XML document to an ASP page, which is the easy bit. However in the XML document I have embedded a Graphics file (.gif, .jpg) using Base64 Encoding. The code for generating this bit of the XML document looks like the code shown below (VB6 PRO) where DOCINPATH is a full path pointing the file binary I wish to embed in the XML document. <BR><BR>My problem is that once the ASP page gets the XML document I cannot get the conversion back to Binary data to work. I know that part of the problem is the fact that all variables in VBScript are of type Variant and I need a "Byte" or Binary type variable to hold the decoded data. <BR><BR>Does anybody have any ideas how I can do this easily ysing MS XMLDom???? <BR><BR><BR>Many thanks in advance!<BR><BR><BR><BR><BR><BR>&#039; Use DataType so MSXML will validate the data type <BR> oEle.dataType = "bin.base64" <BR> <BR>&#039; Read in the data <BR> oEle.nodeTypedValue = ReadBinData(DOCINPATH) <BR><BR><BR>Function ReadBinData(ByVal strFileName As String) As Variant <BR> Dim lLen As Long <BR> Dim iFile As Integer <BR> Dim arrBytes() As Byte <BR> Dim lCount As Long <BR> Dim strOut As String <BR> <BR>&#039;Read from disk <BR> iFile = FreeFile() <BR> Open strFileName For Binary Access Read As iFile <BR> lLen = FileLen(strFileName) <BR> ReDim arrBytes(lLen - 1) <BR> Get iFile, , arrBytes <BR> Close iFile <BR> <BR> ReadBinData = arrBytes <BR>End Function