Java Reference
In-Depth Information
/**
* Set the item title.
* @param title The new item title.
*/
public void setTitle(String title)
{
this.title = title;
}
/**
* Load an item from the specified node.
* @param node The Node to load the item from.
*/
public void load(Node node)
{
NodeList nl = node.getChildNodes();
for (int i = 0; i < nl.getLength(); i++)
{
Node n = nl.item(i);
String name = n.getNodeName();
if (name.equalsIgnoreCase("title"))
title = RSS.getXMLText(n);
else if (name.equalsIgnoreCase("link"))
link = RSS.getXMLText(n);
else if (name.equalsIgnoreCase("description"))
description = RSS.getXMLText(n);
else if (name.equalsIgnoreCase("pubDate"))
{
String str = RSS.getXMLText(n);
if (str != null)
date = RSS.parseDate(str);
}
}
}
/**
* Convert the object to a String.
* @return The object as a String.
*/
public String toString()
{
StringBuilder builder = new StringBuilder();
builder.append('[');
builder.append("title=\"");
Search WWH ::




Custom Search