RssSource.parse constructor

RssSource.parse(
  1. XmlElement element
)

Factory method to create an RssSource object from an XmlElement.

This method parses the element and extracts the URL attribute ('url') and inner text from it to create an RssSource object and returns it.

The extracted URL value is assigned to the url property. The extracted inner text is assigned to the value property.

Implementation

factory RssSource.parse(XmlElement element) {
  var url = element.getAttribute('url');
  var value = element.innerText;

  return RssSource(url, value);
}