Responding to my own message.

Lakers were trounced -- Boo!

Frustrated that I couldn't manipulate a large XML file in CFMX, I  
decided to write a Java program to read a text file, line by line.

Didn't need to --- found one by  Daryl Banttari, at:

http://www.macromedia.com/devnet/server_archive/articles/
leveraging_java_classes_cf.html

This works fine -- takes about 3 seconds to read the 3.8 meg, 85,000  
line file.

Interesting!

1) If it is so easy, why not implement it CFML?  -- the CFMX/Java  
hybrid solution means extra work when you install or maintain the app  
-- you have to deal with Java source and class files.

2) The routine points out another deficiency in CFML (or at least  
CFML's interface to other languages, like Java) -- CFML cannot  
represent/recognize a Null!  The programmer had to provide a  
work-around.

Don't get me wrong, I am happy to find a solution, and being able to  
interface Java is great!

But, IMO, this should not be necessary (to read a large file,  
line-by-line) for a language as rich and powerful as CFML!

Dick

On Jun 15, 2004, at 9:08 PM, Dick Applebaum wrote:
>

>  OK!
>
>  1) I can't readLn a file in CF so I read the entire 3.8 meg xml file
>  into RAM
>
>  2) XmlTransform runs out of memory. so I can't use xls to manipulate
>  the file
>
>  3) XmlSearch runs out of memory so I can't use Xpath to manipulate the
>  file
>
>  4) I can CFexecute a Perl program to parse/render the file in 3-4
>  seconds
>
>  5) I can convert the 3,8 Meg, 85,000 line file to an in-memory array
>  (Now I have the orig file and the array representation of this file in
>  memory at the same time..
>
>  6) Now, I can line-by-line (array-element-by-array-element) process
>  this file.
>
>  What's wrong with this picture --- AFAICT -- everything!
>
>  CF is the wrong tool!
>
>  Thought I'd never say that!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to