From: Naresh Ramaswamy Date: 2009-03-10T12:59:57+09:00 Subject: how to get all attributes in an element hi, I am using REXML I want to get all the attributes under an element. Just imagine that I know the element name but not the attribute names. say and so on as many attributes that can be. I need to get all the attributes under the element. How shall I do it. I looked into REXML doc that provides "doc.root.attributes.each {|name, value| puts name+" => "+value }" But I am able to use this only on root element, and does not work on child or subchild elements. Please let me know how can I do that. Regards, Naresh -- Posted via http://www.ruby-forum.com/.