RssImage.parse constructor
RssImage.parse(
- XmlElement element
Factory method to create an RssImage object from an XmlElement.
This method parses the element and extracts the image information from it
to create an RssImage object and returns it.
The title, url, and link values are obtained by looking for specific elements ('title', 'url', and 'link')
within the element, and then extracting their inner text.
The extracted inner text of each element is assigned to the corresponding property of the RssImage object.
Implementation
factory RssImage.parse(XmlElement element) {
return RssImage(
title: element.findElements('title').firstOrNull?.innerText,
url: element.findElements('url').firstOrNull?.innerText,
link: element.findElements('link').firstOrNull?.innerText,
);
}