PStgEnteredEvent.fromXML constructor

PStgEnteredEvent.fromXML(
  1. String xmlSTR
)

Implementation

factory PStgEnteredEvent.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("pStgEnteredEvent").first;

  return PStgEnteredEvent(
    messageName: messageName,
    messageID: int.parse(messageID),
  );
}