toXml method

XmlElement toXml()

Implementation

XmlElement toXml() {
  switch (rssVersion) {
    case RssVersion.rss1:
      return _toRss1Xml();
    case RssVersion.rss2:
      return _toRss2Xml();
    case RssVersion.atom:
      return _toAtomXml();
    case RssVersion.unknown:
      throw Exception("Can't serialize RSS to XML because the RSS version is unknown.");
  }
}