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