2009-05-19 02:06:49 -04:00
|
|
|
require 'rubygems'
|
2009-07-24 22:25:55 -04:00
|
|
|
require 'base64'
|
2009-05-19 02:06:49 -04:00
|
|
|
require 'nokogiri'
|
2009-06-29 04:02:55 -04:00
|
|
|
require 'time'
|
2009-05-19 02:06:49 -04:00
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
class Base < Nokogiri::XML::SAX::Document
|
|
|
|
|
2009-05-20 21:49:20 -04:00
|
|
|
attr_reader :response
|
2009-05-19 02:06:49 -04:00
|
|
|
|
|
|
|
def initialize
|
|
|
|
reset
|
|
|
|
end
|
|
|
|
|
|
|
|
def reset
|
2009-05-20 21:49:20 -04:00
|
|
|
@response = {}
|
2009-05-19 02:06:49 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def characters(string)
|
|
|
|
@value << string.strip
|
|
|
|
end
|
|
|
|
|
|
|
|
def start_element(name, attrs = [])
|
|
|
|
@value = ''
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|