org.encog.bot.rss
Class RSS

java.lang.Object
  extended by org.encog.bot.rss.RSS

public class RSS
extends Object

This is the class that actually parses the RSS and builds a collection of RSSItems. To make use of this class call the load method with a URL that points to RSS.


Constructor Summary
RSS()
           
 
Method Summary
 Map<String,String> getAttributes()
          Get the list of attributes.
 List<RSSItem> getItems()
           
static String getXMLText(Node n)
          Simple utility method that obtains the text of an XML node.
 void load(URL url)
          Load all RSS data from the specified URL.
 void load(URL url, int timeout)
          Load all RSS data from the specified URL.
static Date parseDate(String datestr)
          Simple utility function that converts a RSS formatted date into a Java date.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RSS

public RSS()
Method Detail

getXMLText

public static String getXMLText(Node n)
Simple utility method that obtains the text of an XML node.

Parameters:
n - The XML node.
Returns:
The text of the specified XML node.

parseDate

public static Date parseDate(String datestr)
Simple utility function that converts a RSS formatted date into a Java date.

Parameters:
datestr - The RSS formatted date.
Returns:
A Java java.util.date

getAttributes

public final Map<String,String> getAttributes()
Get the list of attributes.

Returns:
the attributes

getItems

public final List<RSSItem> getItems()
Returns:
the items

load

public final void load(URL url)
Load all RSS data from the specified URL.

Parameters:
url - The URL to load.

load

public final void load(URL url,
                       int timeout)
Load all RSS data from the specified URL.

Parameters:
url - URL that contains XML data.
timeout - The timeout value.

toString

public final String toString()

Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.