i have xml file 230 mb big with 230 million length when i try to import the file to my android using an app that we made but when attempting readtoend
string into variable im getting an error :
System.outofmemoryexception : out of memory at (wrapper managed-to-native) system.string.fastallocatestring(int) at system.text.stringbuilder.tostring()
here's the following code
var documentsPath = Android.OS.Environment.ExternalStorageDirectory.ToString();
var dirName = System.IO.Path.Combine(documentsPath.ToString(), "Stock");
var filePath = System.IO.Path.Combine(dirName, "Data.xml");
TextReader tr = new StreamReader(filePath);
string result = tr.ReadToEnd();
tr.Close();
var st = new XStreamingElement(filePath);
return result;
can anyone help, thanks in advance.