DeviceQueryRequest.fromXML constructor
DeviceQueryRequest.fromXML(
- String xmlSTR
Implementation
factory DeviceQueryRequest.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
String messageID = document.rootElement.attributes.firstWhere((p0) => p0.name.toString() == "messageID").value;
String deviceName = document.rootElement.childElements
.firstWhere((element) => element.name.toString() == "deviceQueryRequest")
.attributes
.firstWhere((p0) => p0.name.toString() == "deviceName",orElse: ()=>orElseEmpty())
.value;
return DeviceQueryRequest(messageID: int.parse(messageID), deviceName: deviceName);
}