From: James Jhfghgfhgf Date: 2009-08-07T00:43:19+09:00 Subject: Re: Basic XML to nested Array Yeah the program outputting this stuff doesn't add a root element so great tip there, it worked perfectly thanks Heesob! > require 'rexml/document' > doc = REXML::Document.new(""+File.read("a.xml")+"") > res = doc.elements.to_a("/*/*").map{|e1| > e1.elements.to_a.map{|e2|e2.elements.to_a.map{|e3|e3.text}} > } > p res -- Posted via http://www.ruby-forum.com/.