up to now, i've had no problem in using this bit of code to read the content of a file and store it line by line in an array.
Code: Select all
var j = 0;
var fileOK = XmlFile.open("r","XML","???");
if (fileOK){
var F_TXT = "";
while (!XmlFile.eof){
L_TXT = XmlFile.readln(); // Parsing
if (L_TXT == "") L_TXT = "\r" ;
F_TXT = F_TXT+"\n"+ L_TXT;
j++;
writeLn("Reading line: "+j);
} // fin while eof
XmlFile.close();
var txtArray;
var lineArray;
txtArray = F_TXT.split( '\n' );
}
}
I have a 90000 line Xml, and the script never reads beyond 64000, and crashes between 10400 and 64000. In fact it crashes on files longer than 10000 lines (which for xml is quite small).
Any idea ?