Re: new to Ruby and XML


#1

Hi Hunter,

quick and dirty:

Hash[xml.scan(%r{>([^>])}).flatten]

returns

{“12”=>“AAF”,
“7”=>“AAE”,
“13”=>“AAG”,
“8”=>“AAA”,
“9”=>“ISA”,
“1”=>“AAA”,
“2”=>“AAB”,
“4”=>“AAC”,
“5”=>“AAD”}

cheers

Simon