parse static method

RssPodcastIndex? parse(
  1. XmlElement? element
)

Implementation

static RssPodcastIndex? parse(XmlElement? element) {
  if (element == null) {
    return null;
  }

  return RssPodcastIndex(
    guid: findElementOrNull(element, 'podcast:guid')?.innerText,
    funding: element.findElements('podcast:funding').map((e) {
      return RssPodcastIndexFunding.parse(e);
    }).toList(),
    persons: element.findElements('podcast:person').map((e) {
      return RssPodcastIndexPerson.parse(e);
    }).toList(),
    remoteItem: element.findElements('podcast:remoteItem').map((e) {
      return RssPodcastIndexRemoteItem.parse(e);
    }).toList(),
    value: element
        .findElements('podcast:value')
        .map((element) => RssPodcastIndexValue.parse(element))
        .toList(),
    block: element
        .findElements('podcast:block')
        .map((element) => RssPodcastIndexBlock.parse(element))
        .toList(),
    locked: RssPodcastIndexLocked.parse(
      findElementOrNull(element, 'podcast:locked'),
    ),
    license: RssPodcastIndexLicense.parse(
      findElementOrNull(element, 'podcast:license'),
    ),
    medium: findElementOrNull(element, 'podcast:medium')?.innerText,
  );
}