WZomEnteredEvent.fromXML constructor
WZomEnteredEvent.fromXML(
- String xmlSTR
Implementation
factory WZomEnteredEvent.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
String messageName = document.rootElement.attributes.firstWhere((p0) => p0.name.toString() == "messageName").value;
String messageID = document.rootElement.attributes.firstWhere((p0) => p0.name.toString() == "messageID").value;
XmlElement eventElement = document.rootElement.findAllElements("wZomEnteredEvent").first;
String workstation =
eventElement.attributes.firstWhere((p0) => p0.name.toString() == "workstation", orElse: orElseEmpty).value;
return WZomEnteredEvent(
messageName: messageName,
messageID: int.parse(messageID),
workstation: workstation,
);
}