Robert Klemme
1/31/2008 10:22:00 PM
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