ZlStatus.fromXML constructor
ZlStatus.fromXML(
- String xmlSTR
Implementation
factory ZlStatus.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
String desc = document.firstChild!.attributes
.firstWhere((element) => element.name.toString() == "desc",
orElse: orElseEmpty)
.value;
String init = document.firstChild!.attributes
.firstWhere((element) => element.name.toString() == "init")
.value;
String diskError = document.firstChild!.attributes
.firstWhere((element) => element.name.toString() == "diskError")
.value;
String ready = document.firstChild!.attributes
.firstWhere((element) => element.name.toString() == "ready")
.value;
String unknown = document.firstChild!.attributes
.firstWhere((element) => element.name.toString() == "unknown")
.value;
return ZlStatus(
desc: desc,
init: init,
diskError: diskError,
ready: ready,
unknown: unknown);
}