def tagstart(name, attributes)
@inside_tagset = true if name == 'tagSet'
@snapshot = {} if (name == 'item' && ! @inside_tagset)
end
def tagend(name)
case name
when 'volumeId' then
@snapshot[:aws_volume_id] = @text
... removed for clarity...
when 'tagSet' then
@inside_tagset = false
when 'key' then
@tagcount += 1
@snapshot[('aws_tag_' + @tagcount.to_s + '_key').to_sym] =
@text
when 'value' then
@snapshot[('aws_tag_' + @tagcount.to_s + '_value').to_sym]
= @text
when 'item' then
@result << @snapshot unless @inside_tagset
end
end