Event.fromXml constructor

Event.fromXml(
  1. XmlElement elem
)

Implementation

factory Event.fromXml(_s.XmlElement elem) {
  return Event(
    date: _s.extractXmlDateTimeValue(elem, 'Date'),
    eventCategories: _s
        .extractXmlChild(elem, 'EventCategories')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'EventCategory')),
    eventId: _s.extractXmlStringValue(elem, 'EventId'),
    message: _s.extractXmlStringValue(elem, 'Message'),
    severity: _s.extractXmlStringValue(elem, 'Severity'),
    sourceIdentifier: _s.extractXmlStringValue(elem, 'SourceIdentifier'),
    sourceType: _s.extractXmlStringValue(elem, 'SourceType')?.toSourceType(),
  );
}