From: Bob Hutchison Date: 2001-11-14T11:45:07+09:00 Subject: [ruby-talk:25140] Re: XML support in the standard lib; what exactly? On 01/11/13 9:12 PM, "Jim Menard" wrote: > > NQXML reads the file into a string and parses the string. I fooled around > with using a stream (an IO) once, but there was too much mess remembering > where I was in the stream, going back, needing to re-read the IO stream, > etc. that I decided it wasn't worth the bother. > > Maybe it is. > This is better than making a DOM tree, but not ideal from my point-of-view. I'm assuming you got into a backtracking situation of some kind. I am quite sure that some of the faster java event based parsers read a fairly substantial chunk of the file into memory. Keeping the buffer size fixed is better (way better) than making a tree or trying to read in the whole file. Even if the buffer was many MB in size at least its size is bounded. This is important to my application. Cheers, Bob