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')?.text?.trim(),
summary: findElementOrNull(element, 'itunes:summary')?.text?.trim(),
explicit: parseBoolLiteral(element, 'itunes:explicit'),
title: findElementOrNull(element, 'itunes:title')?.text?.trim(),
subtitle: findElementOrNull(element, 'itunes:subtitle')?.text?.trim(),
owner: RssItunesOwner.parse(findElementOrNull(element, 'itunes:owner')),
keywords: findElementOrNull(element, 'itunes:keywords')
?.text
?.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')?.text?.trim(),
block: parseBoolLiteral(element, 'itunes:block'),
complete: parseBoolLiteral(element, 'itunes:complete'),
);
}