2020-02-26 10:54:59 +01:00
|
|
|
import 'package:tsacdop/webfeed/util/helpers.dart';
|
2020-02-09 13:29:09 +01:00
|
|
|
import 'package:xml/xml.dart';
|
|
|
|
|
|
|
|
class AtomPerson {
|
|
|
|
final String name;
|
|
|
|
final String uri;
|
|
|
|
final String email;
|
|
|
|
|
|
|
|
AtomPerson(this.name, this.uri, this.email);
|
|
|
|
|
|
|
|
factory AtomPerson.parse(XmlElement element) {
|
|
|
|
var name = findElementOrNull(element, "name")?.text;
|
|
|
|
var uri = findElementOrNull(element, "uri")?.text;
|
|
|
|
var email = findElementOrNull(element, "email")?.text;
|
|
|
|
return AtomPerson(name, uri, email);
|
|
|
|
}
|
|
|
|
}
|