public new static MSG_SET_READER_CONFIG FromString(string str) { string val; XmlDocument xdoc = new XmlDocument(); xdoc.LoadXml(str); XmlNode node = (XmlNode)xdoc.DocumentElement; MSG_SET_READER_CONFIG msg = new MSG_SET_READER_CONFIG(); try { msg.MSG_ID = Convert.ToUInt32(XmlUtil.GetNodeAttrValue(node, "MessageID")); } catch { } val = XmlUtil.GetNodeValue(node, "ResetToFactoryDefault"); msg.ResetToFactoryDefault = Convert.ToBoolean(val); try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "ReaderEventNotificationSpec"); if (null != xnl) { if (xnl.Count != 0) msg.ReaderEventNotificationSpec = PARAM_ReaderEventNotificationSpec.FromXmlNode(xnl[0]); } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "AntennaProperties"); if (null != xnl) { if (xnl.Count != 0) { msg.AntennaProperties = new PARAM_AntennaProperties[xnl.Count]; for (int i = 0; i < xnl.Count; i++) msg.AntennaProperties[i] = PARAM_AntennaProperties.FromXmlNode(xnl[i]); } } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "AntennaConfiguration"); if (null != xnl) { if (xnl.Count != 0) { msg.AntennaConfiguration = new PARAM_AntennaConfiguration[xnl.Count]; for (int i = 0; i < xnl.Count; i++) msg.AntennaConfiguration[i] = PARAM_AntennaConfiguration.FromXmlNode(xnl[i]); } } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "ROReportSpec"); if (null != xnl) { if (xnl.Count != 0) msg.ROReportSpec = PARAM_ROReportSpec.FromXmlNode(xnl[0]); } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "AccessReportSpec"); if (null != xnl) { if (xnl.Count != 0) msg.AccessReportSpec = PARAM_AccessReportSpec.FromXmlNode(xnl[0]); } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "KeepaliveSpec"); if (null != xnl) { if (xnl.Count != 0) msg.KeepaliveSpec = PARAM_KeepaliveSpec.FromXmlNode(xnl[0]); } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "GPOWriteData"); if (null != xnl) { if (xnl.Count != 0) { msg.GPOWriteData = new PARAM_GPOWriteData[xnl.Count]; for (int i = 0; i < xnl.Count; i++) msg.GPOWriteData[i] = PARAM_GPOWriteData.FromXmlNode(xnl[i]); } } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "GPIPortCurrentState"); if (null != xnl) { if (xnl.Count != 0) { msg.GPIPortCurrentState = new PARAM_GPIPortCurrentState[xnl.Count]; for (int i = 0; i < xnl.Count; i++) msg.GPIPortCurrentState[i] = PARAM_GPIPortCurrentState.FromXmlNode(xnl[i]); } } } catch { } try { XmlNodeList xnl = XmlUtil.GetXmlNodes(node, "EventsAndReports"); if (null != xnl) { if (xnl.Count != 0) msg.EventsAndReports = PARAM_EventsAndReports.FromXmlNode(xnl[0]); } } catch { } try { ArrayList xnl = XmlUtil.GetXmlNodeCustomChildren(node); if (null != xnl) { if (xnl.Count != 0) { for (int i = 0; i < xnl.Count; i++) { ICustom_Parameter custom = CustomParamDecodeFactory.DecodeXmlNodeToCustomParameter((XmlNode)xnl[i]); if (custom != null) msg.AddCustomParameter(custom); } } } } catch { } return msg; }