normalize_rss(rss)
private
Try to get the XML associated with rss.
Return rss if it already looks like XML,
or treat it as a URI, or a file to get the XML,
Show source
def normalize_rss(rss)
return rss if maybe_xml?(rss)
uri = to_uri(rss)
if uri.respond_to?(:read)
uri.read
elsif !rss.tainted? and File.readable?(rss)
File.open(rss) {|f| f.read}
else
rss
end
end