RssItunes.parse constructor
RssItunes.parse(
- XmlElement element
Implementation
factory RssItunes.parse(XmlElement element) {
final categories = findAllDirectElementsOrNull(element, 'itunes:category');
return RssItunes(
author: findElementOrNull(element, 'itunes:author')?.innerText.trim(),
summary: findElementOrNull(element, 'itunes:summary')?.innerText.trim(),
explicit: parseBoolLiteral(element, 'itunes:explicit'),
title: findElementOrNull(element, 'itunes:title')?.innerText.trim(),
subtitle: findElementOrNull(element, 'itunes:subtitle')?.innerText.trim(),
owner: RssItunesOwner.parse(findElementOrNull(element, 'itunes:owner')),
keywords: findElementOrNull(element, 'itunes:keywords')
?.innerText
.split(',')
.map((keyword) => keyword.trim())
.toList() ??
const <String>[],
image: RssItunesImage.parse(findElementOrNull(element, 'itunes:image')),
categories:
categories?.map((ele) => RssItunesCategory.parse(ele)).toList() ??
const <RssItunesCategory>[],
type: newRssItunesType(findElementOrNull(element, 'itunes:type')),
newFeedUrl:
findElementOrNull(element, 'itunes:new-feed-url')?.innerText.trim(),
block: parseBoolLiteral(element, 'itunes:block'),
complete: parseBoolLiteral(element, 'itunes:complete'),
);
}