public CoalProductSpecifications(XmlNode xmlNode) { XmlNodeList standardQualityNodeList = xmlNode.SelectNodes("standardQuality"); if (standardQualityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in standardQualityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { standardQualityIDRef = item.Attributes["id"].Name; CoalStandardQuality ob = CoalStandardQuality(); IDManager.SetID(standardQualityIDRef, ob); } else if (item.Attributes.ToString() == "href") { standardQualityIDRef = item.Attributes["href"].Name; } else { standardQuality = new CoalStandardQuality(item); } } } XmlNodeList standardQualityScheduleNodeList = xmlNode.SelectNodes("standardQualitySchedule"); if (standardQualityScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in standardQualityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { standardQualityScheduleIDRef = item.Attributes["id"].Name; CoalStandardQualitySchedule ob = CoalStandardQualitySchedule(); IDManager.SetID(standardQualityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { standardQualityScheduleIDRef = item.Attributes["href"].Name; } else { standardQualitySchedule = new CoalStandardQualitySchedule(item); } } } }
public CoalProductSpecifications(XmlNode xmlNode) { XmlNodeList standardQualityNodeList = xmlNode.SelectNodes("standardQuality"); if (standardQualityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in standardQualityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { standardQualityIDRef = item.Attributes["id"].Name; CoalStandardQuality ob = CoalStandardQuality(); IDManager.SetID(standardQualityIDRef, ob); } else if (item.Attributes.ToString() == "href") { standardQualityIDRef = item.Attributes["href"].Name; } else { standardQuality = new CoalStandardQuality(item); } } } XmlNodeList standardQualityScheduleNodeList = xmlNode.SelectNodes("standardQualitySchedule"); if (standardQualityScheduleNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in standardQualityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { standardQualityScheduleIDRef = item.Attributes["id"].Name; CoalStandardQualitySchedule ob = CoalStandardQualitySchedule(); IDManager.SetID(standardQualityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { standardQualityScheduleIDRef = item.Attributes["href"].Name; } else { standardQualitySchedule = new CoalStandardQualitySchedule(item); } } } }
public CoalProductSpecifications(XmlNode xmlNode) { XmlNode standardQualityNode = xmlNode.SelectSingleNode("standardQuality"); if (standardQualityNode != null) { if (standardQualityNode.Attributes["href"] != null || standardQualityNode.Attributes["id"] != null) { if (standardQualityNode.Attributes["id"] != null) { standardQualityIDRef_ = standardQualityNode.Attributes["id"].Value; CoalStandardQuality ob = new CoalStandardQuality(standardQualityNode); IDManager.SetID(standardQualityIDRef_, ob); } else if (standardQualityNode.Attributes["href"] != null) { standardQualityIDRef_ = standardQualityNode.Attributes["href"].Value; } else { standardQuality_ = new CoalStandardQuality(standardQualityNode); } } else { standardQuality_ = new CoalStandardQuality(standardQualityNode); } } XmlNode standardQualityScheduleNode = xmlNode.SelectSingleNode("standardQualitySchedule"); if (standardQualityScheduleNode != null) { if (standardQualityScheduleNode.Attributes["href"] != null || standardQualityScheduleNode.Attributes["id"] != null) { if (standardQualityScheduleNode.Attributes["id"] != null) { standardQualityScheduleIDRef_ = standardQualityScheduleNode.Attributes["id"].Value; CoalStandardQualitySchedule ob = new CoalStandardQualitySchedule(standardQualityScheduleNode); IDManager.SetID(standardQualityScheduleIDRef_, ob); } else if (standardQualityScheduleNode.Attributes["href"] != null) { standardQualityScheduleIDRef_ = standardQualityScheduleNode.Attributes["href"].Value; } else { standardQualitySchedule_ = new CoalStandardQualitySchedule(standardQualityScheduleNode); } } else { standardQualitySchedule_ = new CoalStandardQualitySchedule(standardQualityScheduleNode); } } }