ZiDeviceParameter.fromXML constructor
ZiDeviceParameter.fromXML(
- String xmlSTR
Implementation
factory ZiDeviceParameter.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
XmlElement? vendorModelInfoElement =
document.firstChild!.getElement("vendorModelInfo");
XmlElement? ipAndPortElement = document.firstChild!.getElement("ipAndPort");
XmlElement? statusElement = document.firstChild!.getElement("ziStatus");
VendorModelInfo vendorModelInfo = vendorModelInfoElement == null
? VendorModelInfo(vendor: '', model: '', miscInfo: '')
: VendorModelInfo.fromXML(vendorModelInfoElement.toXmlString());
IpAndPort ipAndPort = IpAndPort.fromXML(ipAndPortElement!.toXmlString());
ZiStatus status = ZiStatus.fromXML(statusElement!.toXmlString());
return ZiDeviceParameter(
vendorModelInfo: vendorModelInfo,
ipAndPort: ipAndPort,
status: status,
);
}