Need help with forming a multidimension array from an XML parse.
My XML document is as follows (per SeeqPod API):
<?xml version='1.0' encoding='UTF-8' ?>
<playlist version="1" xmlns="http://xspf.org/ns/0/" start="0" end="0" total="26" prev="None" next="1">
I just cant seem to make an array of @songs from it and I have tried with this code but I get no success:
xml = Net::HTTP.get(URI(url))
songs = REXML::Document.new xml
@songs = 
songs.elements.each('playlist/trackList/track') do |s|
h = 
%w[location title creator].each do |e|
h[e] = s.elements[e].text
@songs << h
Does anyone know what I am doing wrong? I have been fussing with this for hours...