public static SusiThought readRSS(String url) { SyndFeedInput input = new SyndFeedInput(); SyndFeed feed = null; XmlReader xmlreader = new XmlReader(connection.getInputStream()); feed = input.build(xmlreader); } catch (Exception e) { e.printStackTrace();
SyndFeedOutput output = new SyndFeedOutput(); output.output( data.feed, writer ); writer.close();
/** * @return the feed we built as serialized XML string * @throws FeedException if feed error */ public String outputString() throws FeedException { SyndFeedOutput feedWriter = new SyndFeedOutput(); return feedWriter.outputString(feed); }
/** * Creates a SyndFeedOutput instance. * <p> * */ public SyndFeedOutput() { _feedOutput = new WireFeedOutput(); }
/** * Creates a SyndFeedInput instance. * <p> * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen) * */ public SyndFeedInput(boolean validate) { _feedInput = new WireFeedInput(validate); }
protected String getKey(Object obj) { return ((ModuleGenerator)obj).getNamespaceUri(); }
protected String getKey(Object obj) { return ((WireFeedGenerator)obj).getType(); }
protected String getKey(Object obj) { return ((WireFeedParser)obj).getType(); }
public String getKey(Object obj) { return ((ModuleParser)obj).getNamespaceUri(); }
public boolean tryFeed(String feedUrl) throws IOException,MalformedURLException { SyndFeedInput input = new SyndFeedInput(); SyndFeed feed = null; try { feed = input.build(new XmlReader(new URL(feedUrl))); return true; } catch (FeedException e) { // Feed's invalid return false; } }
/** * send the output to designated Writer * * @param writer Writer * @throws FeedException if feed error * @throws IOException if IO error */ public void output(java.io.Writer writer) throws FeedException, IOException { SyndFeedOutput feedWriter = new SyndFeedOutput(); feedWriter.output(feed, writer); }
/** * Creates a SyndFeedOutput instance. * <p> * */ public SyndFeedOutput() { _feedOutput = new WireFeedOutput(); }
/** * Creates a SyndFeedInput instance. * <p> * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen) * */ public SyndFeedInput(boolean validate) { _feedInput = new WireFeedInput(validate); }
protected String getKey(Object obj) { return ((ModuleGenerator)obj).getNamespaceUri(); }
protected String getKey(Object obj) { return ((WireFeedGenerator)obj).getType(); }
protected String getKey(Object obj) { return ((WireFeedParser)obj).getType(); }
/** * Creates a SyndFeedOutput instance. * <p> * */ public SyndFeedOutput() { _feedOutput = new WireFeedOutput(); }
/** * Creates a SyndFeedInput instance. * <p> * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen) * */ public SyndFeedInput(boolean validate) { _feedInput = new WireFeedInput(validate); }
/** * Creates a SyndFeedOutput instance. * <p> * */ public SyndFeedOutput() { _feedOutput = new WireFeedOutput(); }
/** * Creates a SyndFeedInput instance. * <p> * @param validate indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen) * */ public SyndFeedInput(boolean validate) { _feedInput = new WireFeedInput(validate); }