1 17 package com.sun.syndication.io.impl; 18 19 import com.sun.syndication.feed.rss.Item; 20 import org.jdom.Element; 21 22 24 public class RSS093Parser extends RSS092Parser { 25 26 public RSS093Parser() { 27 this("rss_0.93"); 28 } 29 30 protected RSS093Parser(String type) { 31 super(type); 32 } 33 34 protected String getRSSVersion() { 35 return "0.93"; 36 } 37 38 protected Item parseItem(Element rssRoot,Element eItem) { 39 Item item = super.parseItem(rssRoot,eItem); 40 Element e = eItem.getChild("pubDate",getRSSNamespace()); 41 if (e!=null) { 42 item.setPubDate(DateParser.parseRFC822(e.getText())); 43 } 44 e = eItem.getChild("expirationDate",getRSSNamespace()); 45 if (e!=null) { 46 item.setExpirationDate(DateParser.parseRFC822(e.getText())); 47 } 48 e = eItem.getChild("description",getRSSNamespace()); 49 if (e!=null) { 50 String type = e.getAttributeValue("type"); 51 if (type!=null) { 52 item.getDescription().setType(type); 53 } 54 } 55 return item; 56 } 57 58 } 59 | Popular Tags |