Long KML text file with no return chars

William Prothero prothero at earthednet.org
Thu Mar 19 01:17:32 EDT 2015


Folks:
Just wondering. I am reading in a very long text file (2.6Mb and 2.6 million chars) and it has no carriage returns. The “read file until end” statement hangs and goes into the spinning pizza of death on Mac OS Yosemite and LC 7,0,4 and 7.0.3. I used textWrangler to insert hard line breaks, which seemed to work fine, but when  I then added a “replace cr with empty in theData”, it hung the system.

I suspect the long text file overwrote something and then the replace function hung it up. 

So, am I trying to do something out of the range of what Livecode can do? I’m wondering whether I should start editing the file into smaller files. 

My overall goal is to convert the KML (a specific xml format) to an array, using Trevor Devore’s convertXMLToArray, for processing, then save it back to a friendlier format for normal use.

So, do I just start editing the file into smaller files, or is there another strategy that would be more efficient. I’ll have to recreate headers, etc, for each file, but it can’t be too bad.

Best, 
Bill

William A. Prothero
http://es.earthednet.org/




More information about the use-livecode mailing list