<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -90,11 +90,16 @@ private
     return nil unless xml
     property = self.class.properties[name]
 
-    node = xml.at(&quot;/#{property[:path]}&quot;)
-
-    if node
+    values = xml.search(&quot;/#{property[:path]}&quot;).map do |node|
       result = extract_result(node, property[:from])
-      result = cast_result(result, property[:as])
+      cast_result(result, property[:as])
+    end
+    
+    case property[:cardinality]
+    when :many
+      return values
+    else
+      return values.first
     end
   end
 </diff>
      <filename>lib/feed_me/abstract_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,7 @@ module FeedMe
     property :item_id, :path =&gt; :guid
     property :url, :path =&gt; :link
     property :content, :path =&gt; :description
+    property :categories, :path =&gt; :category, :cardinality =&gt; :many
 
     has_one :author, :use =&gt; :Rss2PersonParser
   end</diff>
      <filename>lib/feed_me/item_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,52 +1,52 @@
 &lt;?xml version=&quot;1.0&quot;?&gt;
 &lt;rss version=&quot;2.0&quot;&gt;
-	&lt;channel&gt;
-		&lt;title&gt;Lift Off News&lt;/title&gt;
-		&lt;link&gt;http://liftoff.msfc.nasa.gov/&lt;/link&gt;
-		&lt;description&gt;Liftoff to Space Exploration.&lt;/description&gt;
-		&lt;language&gt;en-us&lt;/language&gt;
-		&lt;pubDate&gt;Tue, 10 Jun 2003 04:00:00 GMT&lt;/pubDate&gt;
-		&lt;lastBuildDate&gt;Tue, 10 Jun 2003 09:41:01 GMT&lt;/lastBuildDate&gt;
-		&lt;docs&gt;http://blogs.law.harvard.edu/tech/rss&lt;/docs&gt;
-		&lt;generator&gt;Weblog Editor 2.0&lt;/generator&gt;
-		&lt;managingEditor&gt;editor@example.com (Mary Jo)&lt;/managingEditor&gt;
-		&lt;webMaster&gt;webmaster@example.com (John Doe)&lt;/webMaster&gt;
-		&lt;ttl&gt;5&lt;/ttl&gt;
-		&lt;item&gt;
-			&lt;title&gt;Star City&lt;/title&gt;
-			&lt;link&gt;http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp&lt;/link&gt;
-			&lt;author&gt;da_man@example.com (Chuck Norris)&lt;/author&gt;
-			&lt;description&gt;This is content&lt;/description&gt;
-			&lt;pubDate&gt;Tue, 03 Jun 2003 09:39:21 GMT&lt;/pubDate&gt;
-            &lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/06/03.html#item573&lt;/guid&gt;
-            &lt;category&gt;news&lt;/category&gt;
-            &lt;category&gt;chuck&lt;/category&gt;
-		&lt;/item&gt;
-		&lt;item&gt;
-			&lt;title&gt;Space Exploration&lt;/title&gt;
-			&lt;link&gt;http://liftoff.msfc.nasa.gov/&lt;/link&gt;
-			&lt;description&gt;Sky watchers in Europe, Asia, and parts of Alaska and Canada
-				will experience a partial eclipse of the Sun on Saturday, May 31st.&lt;/description&gt;
-			&lt;pubDate&gt;Fri, 30 May 2003 11:06:42 GMT&lt;/pubDate&gt;
-			&lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/05/30.html#item572&lt;/guid&gt;
-		&lt;/item&gt;
-		&lt;item&gt;
-			&lt;title&gt;The Engine That Does More&lt;/title&gt;
-			&lt;link&gt;http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp&lt;/link&gt;
-			&lt;description&gt;Before man travels to Mars, NASA hopes to design new engines
-				that will let us fly through the Solar System more quickly.	The proposed
-				VASIMR engine would do that.&lt;/description&gt;
-			&lt;pubDate&gt;Tue, 27 May 2003 08:37:32 GMT&lt;/pubDate&gt;
-			&lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/05/27.html#item571&lt;/guid&gt;
-		&lt;/item&gt;
-		&lt;item&gt;
-			&lt;title&gt;Astronauts' Dirty Laundry&lt;/title&gt;
-			&lt;link&gt;http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp&lt;/link&gt;
-			&lt;description&gt;Compared to earlier spacecraft, the International Space
-				Station has many luxuries, but laundry facilities are not one of them.
-				Instead, astronauts have other options.&lt;/description&gt;
-			&lt;pubDate&gt;Tue, 20 May 2003 08:56:02 GMT&lt;/pubDate&gt;
-			&lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/05/20.html#item570&lt;/guid&gt;
-		&lt;/item&gt;
-	&lt;/channel&gt;
+  &lt;channel&gt;
+    &lt;title&gt;Lift Off News&lt;/title&gt;
+    &lt;link&gt;http://liftoff.msfc.nasa.gov/&lt;/link&gt;
+    &lt;description&gt;Liftoff to Space Exploration.&lt;/description&gt;
+    &lt;language&gt;en-us&lt;/language&gt;
+    &lt;pubDate&gt;Tue, 10 Jun 2003 04:00:00 GMT&lt;/pubDate&gt;
+    &lt;lastBuildDate&gt;Tue, 10 Jun 2003 09:41:01 GMT&lt;/lastBuildDate&gt;
+    &lt;docs&gt;http://blogs.law.harvard.edu/tech/rss&lt;/docs&gt;
+    &lt;generator&gt;Weblog Editor 2.0&lt;/generator&gt;
+    &lt;managingEditor&gt;editor@example.com (Mary Jo)&lt;/managingEditor&gt;
+    &lt;webMaster&gt;webmaster@example.com (John Doe)&lt;/webMaster&gt;
+    &lt;ttl&gt;5&lt;/ttl&gt;
+    &lt;item&gt;
+      &lt;title&gt;Star City&lt;/title&gt;
+      &lt;link&gt;http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp&lt;/link&gt;
+      &lt;author&gt;da_man@example.com (Chuck Norris)&lt;/author&gt;
+      &lt;description&gt;This is content&lt;/description&gt;
+      &lt;pubDate&gt;Tue, 03 Jun 2003 09:39:21 GMT&lt;/pubDate&gt;
+      &lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/06/03.html#item573&lt;/guid&gt;
+      &lt;category&gt;news&lt;/category&gt;
+      &lt;category&gt;chuck&lt;/category&gt;
+    &lt;/item&gt;
+    &lt;item&gt;
+      &lt;title&gt;Space Exploration&lt;/title&gt;
+      &lt;link&gt;http://liftoff.msfc.nasa.gov/&lt;/link&gt;
+      &lt;description&gt;Sky watchers in Europe, Asia, and parts of Alaska and Canada
+        will experience a partial eclipse of the Sun on Saturday, May 31st.&lt;/description&gt;
+      &lt;pubDate&gt;Fri, 30 May 2003 11:06:42 GMT&lt;/pubDate&gt;
+      &lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/05/30.html#item572&lt;/guid&gt;
+    &lt;/item&gt;
+    &lt;item&gt;
+      &lt;title&gt;The Engine That Does More&lt;/title&gt;
+      &lt;link&gt;http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp&lt;/link&gt;
+      &lt;description&gt;Before man travels to Mars, NASA hopes to design new engines
+        that will let us fly through the Solar System more quickly.  The proposed
+        VASIMR engine would do that.&lt;/description&gt;
+      &lt;pubDate&gt;Tue, 27 May 2003 08:37:32 GMT&lt;/pubDate&gt;
+      &lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/05/27.html#item571&lt;/guid&gt;
+    &lt;/item&gt;
+    &lt;item&gt;
+      &lt;title&gt;Astronauts' Dirty Laundry&lt;/title&gt;
+      &lt;link&gt;http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp&lt;/link&gt;
+      &lt;description&gt;Compared to earlier spacecraft, the International Space
+        Station has many luxuries, but laundry facilities are not one of them.
+        Instead, astronauts have other options.&lt;/description&gt;
+      &lt;pubDate&gt;Tue, 20 May 2003 08:56:02 GMT&lt;/pubDate&gt;
+      &lt;guid&gt;http://liftoff.msfc.nasa.gov/2003/05/20.html#item570&lt;/guid&gt;
+    &lt;/item&gt;
+  &lt;/channel&gt;
 &lt;/rss&gt;</diff>
      <filename>spec/fixtures/welformed.rss2</filename>
    </modified>
    <modified>
      <diff>@@ -67,6 +67,12 @@ describe FeedMe::ItemParser do
     end
   end
 
+  describe '#categories' do
+    it &quot;should be correct for an rss2 feed&quot; do
+      @rss2.categories.should == ['news', 'chuck']
+    end
+  end
+
   describe '#author.name' do
     it &quot;should be valid for an atom feed&quot; do
       @atom.author.name.should == &quot;Jonas Nicklas&quot;</diff>
      <filename>spec/item_parser_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3e4073fa5a6e8ae9ebbd13288f174ae9439425de</id>
    </parent>
  </parents>
  <author>
    <name>Jonas Nicklas</name>
    <email>jonas.nicklas@gmail.com</email>
  </author>
  <url>http://github.com/jnicklas/feed_me/commit/6e59ff90280ef5c53290f7aef03532bb21d4e41a</url>
  <id>6e59ff90280ef5c53290f7aef03532bb21d4e41a</id>
  <committed-date>2009-05-10T13:05:31-07:00</committed-date>
  <authored-date>2009-05-10T13:05:31-07:00</authored-date>
  <message>Re-add categories for RSS2 feeds

Lost in rebase

Thanks namelessjon</message>
  <tree>bf1472c50bcf15147568a054fab58eaa4673525a</tree>
  <committer>
    <name>Jonas Nicklas</name>
    <email>jonas.nicklas@gmail.com</email>
  </committer>
</commit>
