public String SetDeviceConfig()
{
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlNode xnRoot = xmlDoc.CreateElement("root");
foreach (Devices devices in deviceList)
{
System.Xml.XmlDocument xmlDocChild = new System.Xml.XmlDocument();
System.Xml.XmlNode xnRecord = xmlDoc.CreateElement("device");
System.Xml.XmlNode xnSuite = xmlDoc.CreateElement("suite");
xnSuite.InnerText = devices.suite.ToString();
xnRecord.AppendChild(xnSuite);
System.Xml.XmlNode xnAddress = xmlDoc.CreateElement("address");
xnAddress.InnerText = devices.address.ToString();
xnRecord.AppendChild(xnAddress);
System.Xml.XmlNode xnDeviceType = xmlDoc.CreateElement("deviceType");
xnDeviceType.InnerText = devices.deviceType.ToString();
xnRecord.AppendChild(xnDeviceType);
System.Xml.XmlNode xnFactory = xmlDoc.CreateElement("factory");
xnFactory.InnerText = devices.factory.ToString();
xnRecord.AppendChild(xnFactory);
}
return(xnRoot.OuterXml);
}