AtomItem.parse constructor
AtomItem.parse(
- XmlElement element
Implementation
factory AtomItem.parse(XmlElement element) {
return AtomItem(
id: element.findElements('id').firstOrNull?.innerText,
title: element.findElements('title').firstOrNull?.innerText,
updated:
parseDateTime(element.findElements('updated').firstOrNull?.innerText),
authors: element
.findElements('author')
.map((e) => AtomPerson.parse(e))
.toList(),
links:
element.findElements('link').map((e) => AtomLink.parse(e)).toList(),
categories: element
.findElements('category')
.map((e) => AtomCategory.parse(e))
.toList(),
contributors: element
.findElements('contributor')
.map((e) => AtomPerson.parse(e))
.toList(),
source: element
.findElements('source')
.map((e) => AtomSource.parse(e))
.firstOrNull,
published: element.findElements('published').firstOrNull?.innerText,
content: element.findElements('content').firstOrNull?.innerText,
summary: element.findElements('summary').firstOrNull?.innerText,
rights: element.findElements('rights').firstOrNull?.innerText,
media: Media.parse(element),
);
}