PrintRequestStatusEvent.fromXML constructor
PrintRequestStatusEvent.fromXML(
- String xmlSTR
Implementation
factory PrintRequestStatusEvent.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("printRequestStatusEvent").first;
String documentID = eventElement.attributes.firstWhere((p0) => p0.name.toString() == "documentID", orElse: orElseEmpty).value;
String status = eventElement.attributes.firstWhere((p0) => p0.name.toString() == "status", orElse: orElseEmpty).value;
return PrintRequestStatusEvent(
messageName: messageName,
messageID: int.parse(messageID),
documentID: documentID,
status: status,
);
}