kevid wrote:
> I have actually gone through the link you gave me. I am new to the
> concept of rexml stream mode xml parsing.
> 
> An example with the above xml doc. will get me started.
> 
> I anticipate your response or that of any other person

Which part of the text I quoted do you not understand?

"REXML stream parsing requires you to supply a Listener class"

Do you know how to create a class in Ruby? It's just:

class MyListener
end

"When a tag is encountered, the stream listener's tag_start() method is
called. When the tag end is encountered, tag_end() is called. When text
is encountered, text() is called, and so on, until the end of the stream
is reached"

So, add those methods to your class, just like it says.

class MyListener
  def tag_start(*args)
    puts "Got tag_start with #{args.inspect}"
  end
  def tag_end(*args)
    puts "Got tag_start with #{args.inspect}"
  end
  def text(*args)
    puts "Got text with #{args.inspect}"
  end
end

The rest of the code you need is directly given in the example.
-- 
Posted via http://www.ruby-forum.com/.