I have an array containing objects of different classes.Each class is
basically hash containing attribute/value pairs. Now how can we convert
it to xml format?
If you still have problems it would be helpful to post some code, one
would need to look into the ary
HTH
R.
Thanks for your reply.
But I am afraid that it works only in rails console, not in irb console.
This is because to_xml method is defined inside ActiveSupport of rails.
But I want pure ruby code to convert to xml.
Actually in my case, array is the collection of objects. And object is
basically collection of hashes. Finally I made it own using REXML.
For reference see :
···
On Tue, Aug 24, 2010 at 6:33 AM, Shyam Krishna Khadka > <shyamkkhadka@gmail.com> wrote:
I agree with you. But for my case, I am writing pure ruby gem that has
to convert an array of different objects into xml. So using
ActiveSupport inside ruby code seemed to be weird one.