Sha256: 30f06a77e9a4d6cf60ec69eab06ea671e8b5688e2c4f34a7dffe06bfc1847b6a

Contents?: true

Size: 810 Bytes

Versions: 6

Compression:

Stored size: 810 Bytes

Contents

module Feedjira

  module Parser
    # Parser for dealing with Feedburner Atom feeds.
    class AtomFeedBurner
      include SAXMachine
      include FeedUtilities
      element :title
      element :subtitle, :as => :description
      element :link, :as => :url, :value => :href, :with => {:type => "text/html"}
      element :link, :as => :feed_url, :value => :href, :with => {:type => "application/atom+xml"}
      elements :"atom10:link", :as => :hubs, :value => :href, :with => {:rel => "hub"}
      elements :entry, :as => :entries, :class => AtomFeedBurnerEntry

      def self.able_to_parse?(xml) #:nodoc:
        ((/Atom/ =~ xml) && (/feedburner/ =~ xml) && !(/\<rss|\<rdf/ =~ xml)) || false
      end

      def self.preprocess(xml)
        Preprocessor.new(xml).to_xml
      end
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
feedjira-2.0.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.6.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.5.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.4.0 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.3.1 lib/feedjira/parser/atom_feed_burner.rb
feedjira-1.3.0 lib/feedjira/parser/atom_feed_burner.rb