Package net.sf.jpluck.feed

Examples of net.sf.jpluck.feed.AtomFeed


      document = builder.parse(new InputSource(new ByteArrayInputStream(data)));
    } catch (Exception e) {
      InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(data), "ISO-8859-1");
      document = builder.parse(new InputSource(reader));
    }
    AtomFeed feed = new AtomFeed(document);
    FeedFormatter formatter = new FeedFormatter(feed, (Feed)jxl.getDocuments()[0]);
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    transformer.transform(new DOMSource(formatter.getIndexDocument()),
      new StreamResult(new File(file.getParentFile(),"index.html")));
    for (int i = 0, n = feed.getItems().length; i < n; i++) {
      transformer.transform(new DOMSource(formatter.getItemDocuments()[i]),
        new StreamResult(new File(file.getParentFile(),"item" + (i+1) + ".html")));
    }   
  }
View Full Code Here


      org.w3c.dom.Document dom = parseDocument(resource.getData());
      String rootName = dom.getDocumentElement().getLocalName();
      net.sf.jpluck.feed.Feed feed = null;
      if (rootName.equals("feed")) {
        // Atom feed
        feed = new AtomFeed(dom);
      } else {   
        feed = new RSSFeed(dom);
      }
      FeedFormatter formatter = new FeedFormatter(feed, settings);
      boolean generateBookmarks = ClientConfiguration.getDefault().isGenerateBookmarks();
View Full Code Here

TOP

Related Classes of net.sf.jpluck.feed.AtomFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.