parse static method

RssEnclosure? parse(
  1. XmlElement? element
)

Implementation

static RssEnclosure? parse(XmlElement? element) {
  if (element == null) {
    return null;
  }
  final url = element.getAttribute('url');
  final type = element.getAttribute('type');
  final length = int.tryParse(element.getAttribute('length') ?? '0') ?? 0;
  return RssEnclosure(url, type, length);
}