Podcast.parse constructor
Podcast.parse(
- XmlElement element
Factory method to parse an XmlElement
and create a Podcast object from it.
The element
is an XML element containing the podcast information.
Returns the parsed Podcast object.
Implementation
factory Podcast.parse(XmlElement element) {
return Podcast(
locked: element
.findElements('podcast:locked')
.map((e) => Locked.parse(e))
.firstOrNull,
funding: element
.findElements('podcast:funding')
.map((e) => Funding.parse(e))
.firstOrNull,
people: element
.findElements('podcast:person')
.map((e) => Person.parse(e))
.toList(),
location: element
.findElements('podcast:location')
.map((e) => Location.parse(e))
.firstOrNull,
trailers: element
.findElements('podcast:trailer')
.map((e) => Trailer.parse(e))
.toList(),
license: element
.findElements('podcast:license')
.map((e) => License.parse(e))
.firstOrNull,
guid: element
.findElements('podcast:guid')
.map((e) => Guid.parse(e))
.firstOrNull,
value: element
.findElements('podcast:value')
.map((e) => Value.parse(e))
.firstOrNull,
medium: element
.findElements('podcast:medium')
.map((e) => Medium.parse(e))
.firstOrNull,
images: element
.findElements('podcast:images')
.map((e) => Images.parse(e))
.firstOrNull,
liveItems: element
.findElements('podcast:liveItem')
.map((e) => LiveItem.parse(e))
.toList(),
);
}