From: Robert Klemme Date: 2008-02-01T07:24:59+09:00 Subject: Re: memory considerations when parsing XML file On 31.01.2008 20:56, Mr_Tibs wrote: > I'm sorry for rushing with the post. I just read that parse_stream > also takes an IO object, so I don't have to do read on the filename. :-) And the idiom should rather read File.open(filename, 'rb') do |io| REXML::Document.parse_stream(io, MyListener.new) end i.e. use the block form of File.open. robert