def self.from_xml(xml,flickr=nil)
att = xml.attributes
ppid = att['id']
pool = flickr.photopool_cache_lookup(ppid)
pool ||= Flickr::PhotoPool.new(ppid,flickr)
pool.page = att['page'].to_i if att['page']
pool.pages = att['pages'].to_i if att['pages']
pool.perpage = att['perpage'].to_i if att['perpage']
pool.total = att['total'].to_i if att['total']
if xml.elements['photo']
xml.elements.each('photo') do |el|
pool.<<(Flickr::Photo.from_xml(el,flickr),true)
end
end
flickr.photopool_cache_store(pool) if flickr
return pool
end