RssItem.parse constructor
RssItem.parse(
- XmlElement element
Implementation
factory RssItem.parse(XmlElement element) {
return RssItem(
title: findElementOrNull(element, 'title')?.text,
description: findElementOrNull(element, 'description')?.text,
link: findElementOrNull(element, 'link')?.text,
categories: element.findElements('category').map((element) => RssCategory.parse(element)).toList(),
guid: findElementOrNull(element, 'guid')?.text,
pubDate: findElementOrNull(element, 'pubDate')?.text,
author: findElementOrNull(element, 'author')?.text,
comments: findElementOrNull(element, 'comments')?.text,
source: RssSource.parse(findElementOrNull(element, 'source')),
content: RssContent.parse(findElementOrNull(element, 'content:encoded')),
media: Media.parse(element),
enclosure: RssEnclosure.parse(findElementOrNull(element, 'enclosure')),
dc: DublinCore.parse(element),
itunes: RssItemItunes.parse(element),
podcastIndex: RssItemPodcastIndex.parse(element),
);
}