InterfaceLevelsAvailableRequest.fromXML constructor
InterfaceLevelsAvailableRequest.fromXML(
- String xmlSTR
Implementation
factory InterfaceLevelsAvailableRequest.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
document.findElements("messageName");
String messageID = document.rootElement.attributes
.firstWhere((p0) => p0.name.toString() == "messageID")
.value;
// String xmlns = document.rootElement.attributes.firstWhere((p0) => p0.name.toString() == "xmlns").value;
String xsi = document.rootElement.attributes
.firstWhere((p0) => p0.name.toString() == "xmlns:xsi")
.value;
String hsXsdVersion = document.rootElement.childElements.first.attributes
.firstWhere((p0) => p0.name.toString() == "hsXsdVersion")
.value;
return InterfaceLevelsAvailableRequest(
hsXsdVersion: hsXsdVersion,
xsi: xsi,
// xmlns: xmlns,
messageID: int.parse(messageID));
}