From: "Nation, Carey" Date: 2012-06-15T03:25:08+09:00 Subject: Re: Parsing xml dict files Something like the below but with actually building the hash on the fly? require 'rexml/document' $doc = nil File.open("foo.xml", "r") do |aFile| $doc = REXML::Document.new( aFile) end $doc.root.each_element("/dict/*") do |node| puts node end -----Original Message----- From: cyber c. [mailto:lists@ruby-forum.com] Sent: Thursday, June 14, 2012 1:54 PM To: ruby-talk ML Subject: Parsing xml dict files Hi, I know that i can use "Nokogiri" to parse xml files and search for results. How do we deal with xml dict files where you have a [key,string] pairs associated. Sample file A val1 B val2 C val3 I want to match name with key and extract value from string. Please help me. -- Posted via http://www.ruby-forum.com/.