2013-11-06 02:15:09 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2012-10-12 12:45:51 +00:00
|
|
|
module MusicBrainz
|
|
|
|
module Bindings
|
|
|
|
module Track
|
|
|
|
def parse(xml)
|
|
|
|
{
|
|
|
|
position: (xml.xpath('./position').text rescue nil),
|
|
|
|
recording_id: (xml.xpath('./recording').attribute('id').value rescue nil),
|
|
|
|
title: (xml.xpath('./recording/title').text rescue nil),
|
|
|
|
length: (xml.xpath('./recording/length').text rescue nil)
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
extend self
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|