Requirements

  • A Java Runtime (version 5 or above).
  • An application to make use of the library.

Usage

  • Add the rsspect-<version>.jar to the java classpath.
  • For a maven project, add the rsspect library as a maven dependency to your project.
    <dependency>
    <groupId>com.colorfulsoftware</groupId>
    <artifactId>rsspect</artifactId>
    <version>1.0.0.0</version>
    </dependency>

Highlights

  • RSSpect is designed to be easy-to-use for solving RSS feed issues quickly.
  • It comes with an intuitive, developer-friendly API.
  • All objects in the library are serializable, immutable and thread-safe.
  • Fully tested for accuracy (See the distributed test-sources.jar for reference).
  • Minimal dependencies. RSSpect only requires a stax-api implementation to work.
  • In the spirit of Open Source Software, RSSpect is licensed with the terms of the Apache License, Version 2.0.

Examples

  • Read a file from disk into an RSS bean.
    RSS myRSS = new RSSDoc().readRSSToBean(new File("/myPath/myRSS.xml");
  • Read a file from the web into an RSS bean.
    RSS myRSS = new RSSDoc().readRSSToBean(new URL("http://www.abcdefg.net/myRSS.xml");
  • Read an RSS bean into a String.
    String myRssStr = myRSS.toString();
  • Read an RSS bean into a formatted String.
    String myRssStr = new RSSDoc().readRSSToString(myRSS, "javanet.staxutils.IndentingXMLStreamWriter");
  • Write an RSS bean to disk.
    new RSSDoc().writeRSSDoc(new File("/somewhere/myRSS.xml"), myRSS, "UTF-8", "1.0");
  • Write a formatted RSS bean to disk.
    new RSSDoc().writeRSSDoc(new javanet.staxutils.IndentingXMLStreamWriter( XMLOutputFactory.newInstance().createXMLStreamWriter( new FileOutputStream("/somewhere/myRSS.xml"), "UTF-8")), myRSS, "UTF-8", "1.0");

See Also

  • Visit the brother project Atomsphere for using Atom 1.0 feeds.