Document.fromXML constructor
Document.fromXML(
- XmlElement element
Creates document from parsed XML.
Implementation
Document.fromXML(XmlElement element)
: this(
id: int.tryParse(element.getAttribute('edesky_id')!),
name: element.getAttribute('name'),
createdAt: element.getAttribute('created_at'),
url: element.getAttribute('edesky_url'),
origUrl: element.getAttribute('orig_url'),
textUrl: element.getAttribute('edesky_text_url'),
dashboardId: int.tryParse(element.getAttribute('dashboard_id')!),
attachments: element
.findAllElements('attachment')
.map((el) => Attachment.fromXML(el))
.toList(),
);