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(’/files.xml’),

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.