org.encog.bot.rss
Class RSS
- java.lang.Object
-
- org.encog.bot.rss.RSS
-
public class RSS extends java.lang.ObjectThis 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
Constructors Constructor and Description RSS()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Map<java.lang.String,java.lang.String>getAttributes()Get the list of attributes.java.util.List<RSSItem>getItems()static java.lang.StringgetXMLText(org.w3c.dom.Node n)Simple utility method that obtains the text of an XML node.voidload(java.net.URL url)Load all RSS data from the specified URL.voidload(java.net.URL url, int timeout)Load all RSS data from the specified URL.static java.util.DateparseDate(java.lang.String datestr)Simple utility function that converts a RSS formatted date into a Java date.java.lang.StringtoString()
-
-
-
Method Detail
-
getXMLText
public static java.lang.String getXMLText(org.w3c.dom.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 java.util.Date parseDate(java.lang.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 java.util.Map<java.lang.String,java.lang.String> getAttributes()
Get the list of attributes.- Returns:
- the attributes
-
getItems
public final java.util.List<RSSItem> getItems()
- Returns:
- the items
-
load
public final void load(java.net.URL url)
Load all RSS data from the specified URL.- Parameters:
url- The URL to load.
-
load
public final void load(java.net.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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG