Return parsed object from REXML::StreamListener

E

endlessinfinity

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,208
Messages
2,571,084
Members
47,683
Latest member
AustinFairchild

Latest Threads

Top