RssItem.parse constructor
RssItem.parse(
- XmlElement element
Implementation
factory RssItem.parse(XmlElement element) {
return RssItem(
title: findElementOrNull(element, 'title')?.innerText,
description: findElementOrNull(element, 'description')?.innerText,
link: findElementOrNull(element, 'link')?.innerText,
categories: element.findElements('category').map((element) => RssCategory.parse(element)).toList(),
guid: findElementOrNull(element, 'guid')?.innerText,
pubDate: findElementOrNull(element, 'pubDate')?.innerText,
author: findElementOrNull(element, 'author')?.innerText,
comments: findElementOrNull(element, 'comments')?.innerText,
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),
);
}