public ServiceAdvisory(XmlNode xmlNode) { XmlNode categoryNode = xmlNode.SelectSingleNode("category"); if (categoryNode != null) { if (categoryNode.Attributes["href"] != null || categoryNode.Attributes["id"] != null) { if (categoryNode.Attributes["id"] != null) { categoryIDRef_ = categoryNode.Attributes["id"].Value; ServiceAdvisoryCategory ob = new ServiceAdvisoryCategory(categoryNode); IDManager.SetID(categoryIDRef_, ob); } else if (categoryNode.Attributes["href"] != null) { categoryIDRef_ = categoryNode.Attributes["href"].Value; } else { category_ = new ServiceAdvisoryCategory(categoryNode); } } else { category_ = new ServiceAdvisoryCategory(categoryNode); } } XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode effectiveFromNode = xmlNode.SelectSingleNode("effectiveFrom"); if (effectiveFromNode != null) { if (effectiveFromNode.Attributes["href"] != null || effectiveFromNode.Attributes["id"] != null) { if (effectiveFromNode.Attributes["id"] != null) { effectiveFromIDRef_ = effectiveFromNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(effectiveFromNode); IDManager.SetID(effectiveFromIDRef_, ob); } else if (effectiveFromNode.Attributes["href"] != null) { effectiveFromIDRef_ = effectiveFromNode.Attributes["href"].Value; } else { effectiveFrom_ = new XsdTypeDateTime(effectiveFromNode); } } else { effectiveFrom_ = new XsdTypeDateTime(effectiveFromNode); } } XmlNode effectiveToNode = xmlNode.SelectSingleNode("effectiveTo"); if (effectiveToNode != null) { if (effectiveToNode.Attributes["href"] != null || effectiveToNode.Attributes["id"] != null) { if (effectiveToNode.Attributes["id"] != null) { effectiveToIDRef_ = effectiveToNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(effectiveToNode); IDManager.SetID(effectiveToIDRef_, ob); } else if (effectiveToNode.Attributes["href"] != null) { effectiveToIDRef_ = effectiveToNode.Attributes["href"].Value; } else { effectiveTo_ = new XsdTypeDateTime(effectiveToNode); } } else { effectiveTo_ = new XsdTypeDateTime(effectiveToNode); } } }
public ServiceAdvisory(XmlNode xmlNode) { XmlNodeList categoryNodeList = xmlNode.SelectNodes("category"); if (categoryNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in categoryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { categoryIDRef = item.Attributes["id"].Name; ServiceAdvisoryCategory ob = ServiceAdvisoryCategory(); IDManager.SetID(categoryIDRef, ob); } else if (item.Attributes.ToString() == "href") { categoryIDRef = item.Attributes["href"].Name; } else { category = new ServiceAdvisoryCategory(item); } } } XmlNodeList descriptionNodeList = xmlNode.SelectNodes("description"); if (descriptionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in descriptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { descriptionIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(descriptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { descriptionIDRef = item.Attributes["href"].Name; } else { description = new XsdTypeString(item); } } } XmlNodeList effectiveFromNodeList = xmlNode.SelectNodes("effectiveFrom"); if (effectiveFromNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveFromNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveFromIDRef = item.Attributes["id"].Name; XsdTypeDateTime ob = XsdTypeDateTime(); IDManager.SetID(effectiveFromIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveFromIDRef = item.Attributes["href"].Name; } else { effectiveFrom = new XsdTypeDateTime(item); } } } XmlNodeList effectiveToNodeList = xmlNode.SelectNodes("effectiveTo"); if (effectiveToNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveToNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveToIDRef = item.Attributes["id"].Name; XsdTypeDateTime ob = XsdTypeDateTime(); IDManager.SetID(effectiveToIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveToIDRef = item.Attributes["href"].Name; } else { effectiveTo = new XsdTypeDateTime(item); } } } }
public ServiceAdvisory(XmlNode xmlNode) { XmlNode categoryNode = xmlNode.SelectSingleNode("category"); if (categoryNode != null) { if (categoryNode.Attributes["href"] != null || categoryNode.Attributes["id"] != null) { if (categoryNode.Attributes["id"] != null) { categoryIDRef_ = categoryNode.Attributes["id"].Value; ServiceAdvisoryCategory ob = new ServiceAdvisoryCategory(categoryNode); IDManager.SetID(categoryIDRef_, ob); } else if (categoryNode.Attributes["href"] != null) { categoryIDRef_ = categoryNode.Attributes["href"].Value; } else { category_ = new ServiceAdvisoryCategory(categoryNode); } } else { category_ = new ServiceAdvisoryCategory(categoryNode); } } XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode effectiveFromNode = xmlNode.SelectSingleNode("effectiveFrom"); if (effectiveFromNode != null) { if (effectiveFromNode.Attributes["href"] != null || effectiveFromNode.Attributes["id"] != null) { if (effectiveFromNode.Attributes["id"] != null) { effectiveFromIDRef_ = effectiveFromNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(effectiveFromNode); IDManager.SetID(effectiveFromIDRef_, ob); } else if (effectiveFromNode.Attributes["href"] != null) { effectiveFromIDRef_ = effectiveFromNode.Attributes["href"].Value; } else { effectiveFrom_ = new XsdTypeDateTime(effectiveFromNode); } } else { effectiveFrom_ = new XsdTypeDateTime(effectiveFromNode); } } XmlNode effectiveToNode = xmlNode.SelectSingleNode("effectiveTo"); if (effectiveToNode != null) { if (effectiveToNode.Attributes["href"] != null || effectiveToNode.Attributes["id"] != null) { if (effectiveToNode.Attributes["id"] != null) { effectiveToIDRef_ = effectiveToNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(effectiveToNode); IDManager.SetID(effectiveToIDRef_, ob); } else if (effectiveToNode.Attributes["href"] != null) { effectiveToIDRef_ = effectiveToNode.Attributes["href"].Value; } else { effectiveTo_ = new XsdTypeDateTime(effectiveToNode); } } else { effectiveTo_ = new XsdTypeDateTime(effectiveToNode); } } }