1 16 package web.rss; 17 18 import java.io.Reader ; 19 20 import org.apache.commons.digester.Digester; 21 22 26 public class _AtomHunter extends RssHunter { 27 28 31 protected Channel parse(Reader content) throws Exception { 32 Digester dig = getDigester(); 33 dig.addBeanPropertySetter("feed/title","title"); 34 dig.addSetProperties("feed/link","href","link"); 35 dig.addBeanPropertySetter("feed/info","description"); 36 dig.addObjectCreate("feed/entry", Item.class); 37 dig.addSetNext("feed/entry","addItem"); 38 dig.addBeanPropertySetter("feed/entry/title","title"); 39 dig.addSetProperties("feed/entry/link","href","link"); 40 dig.addBeanPropertySetter("feed/entry/content","description"); 41 42 return (Channel)dig.parse(content); 43 } 44 45 } 46 | Popular Tags |