Converts an XML node to an RSS item.
Converts an XML node to an RSS item.
If a link
child is present, but cannot be converted to an URL, the
corresponding RSS-item parameter becomes None
.
If a pubDate
child is present, but cannot be converted to a date using
dateFormat
, the corresponding RSS-item parameter becomes None
.
Apart from that, if a child corresponding to an RSS-item parameter is not
present or empty, the parameter becomes None
. An exception is the
title
parameter which becomes the empty string if not present or empty.
the XML node to be converted
the format to be used on the pubDate
child
the resulting RSS item
No check is made if node
is really an RSS item. Applying to an XML
node other than an RSS item yields a result like
RssItem("", None, None, None, None, None)
or some other garbage but
throws no exception.