VendorModelInfo.fromXML constructor
VendorModelInfo.fromXML(
- String xmlSTR
Implementation
factory VendorModelInfo.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
String miscInfo =
document.firstChild!.attributes.firstWhere((element) => element.name.toString() == "miscInfo", orElse: orElseEmpty).value;
String model =
document.firstChild!.attributes.firstWhere((element) => element.name.toString() == "model", orElse: orElseEmpty).value;
String vendor =
document.firstChild!.attributes.firstWhere((element) => element.name.toString() == "vendor", orElse: orElseEmpty).value;
String poCapabilities = document.firstChild!.attributes
.firstWhere((element) => element.name.toString() == "poCapabilities", orElse: orElseEmpty)
.value;
return VendorModelInfo(
miscInfo: miscInfo, model: model, vendor: vendor, poCapabilities: poCapabilities.isEmpty ? null : poCapabilities);
}