newRssItunesEpisodeType function

RssItunesEpisodeType newRssItunesEpisodeType (
  1. XmlElement element
)

Implementation

RssItunesEpisodeType newRssItunesEpisodeType(XmlElement element) {
  // "full" is default type
  if (element == null) return RssItunesEpisodeType.full;

  switch (element.text) {
    case "full":
      return RssItunesEpisodeType.full;
    case "trailer":
      return RssItunesEpisodeType.trailer;
    case "bonus":
      return RssItunesEpisodeType.bonus;
    default:
      return null;
  }
}