:confused::confused:Hi, Thanks for your message. I am just trying to store a encoded XMl file data into the string..so that I do not need to decode it any time..and make it physically available to the user..hence I need to store the data into a string. But after a limit it stops appending the data to the string, I hope there cannot be any NULL into a XML file. When i try to decode it, the file is decoded successfully and hence it is in proper XML format..but when i try to store the same data into string it just stops at a point..here is the piece of code i am using.. CString S; CString XML; XML=S; CFile inFile; BYTE con[65535]; CFile outFile; if(!inFile.Open(inFilePath,CFile::modeRead|CFile::shareDenyNone)) return "Error"; if(!outFile.Open(outFilePath,CFile::modeCreate|CFile::modeWrite)) return false; CArchive ar(&inFile,CArchive::load); BYTE Result[57+1]; while(ar.ReadString(S)) { char Len=Decode(Result,S); XML+=Result; // MessageBox(NULL,XML,"XML",MB_OK); outFile.Write(Result, Len); } return XML; Please help..Thanks a lot in advance..My data in XML is around 1 MB..the file size id 1.2 MB nearly.. Regards Himanshu