Return parsed object from REXML::StreamListener

I’ve successfully created a Listener class that creates a number of
objects and can access these using methods within the Listener class
but have no idea how to get at the objects once the Listener has
finished parsing.

I’m calling the Listener with

files = Document.parse_stream(File.new(’/files.xml’), FileListener.new)

and was thinking that through ‘files’ I would be able to access the
objects I created as the xml was parsed.

I’m a bit of a newbie to programming so if this isn’t possible or I’ve
got the wrong end of the stick let me know.

Cheers

Kieran

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs