Brian Candler wrote:
> The rest of the code you need is directly given in the example.

"A StreamListener module has been supplied as a template for you to 
use."

That means you can write:

class MyListener
  include REXML::StreamListener
end

and have empty (do-nothing) implementations of tag_start, tag_end etc, 
which you can selectively override for the things you're interested in. 
If you follow the link to

http://www.germane-software.com/software/rexml/doc/classes/REXML/StreamListener.html

and open each method up, you'll see the correct template for the method. 
e.g.

class MyListener
  include REXML::StreamListener
  def tag_start(name,attrs)
    puts "Yo! Got start tag #{name.inspect} with attrs #{attrs.inspect}"
  end
end
-- 
Posted via http://www.ruby-forum.com/.