public CreditSupportAgreement(XmlNode xmlNode) { XmlNodeList typeNodeList = xmlNode.SelectNodes("type"); if (typeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in typeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { typeIDRef = item.Attributes["id"].Name; CreditSupportAgreementType ob = CreditSupportAgreementType(); IDManager.SetID(typeIDRef, ob); } else if (item.Attributes.ToString() == "href") { typeIDRef = item.Attributes["href"].Name; } else { type = new CreditSupportAgreementType(item); } } } XmlNodeList dateNodeList = xmlNode.SelectNodes("date"); if (dateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(dateIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateIDRef = item.Attributes["href"].Name; } else { date = new XsdTypeDate(item); } } } XmlNodeList identifierNodeList = xmlNode.SelectNodes("identifier"); if (identifierNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in identifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { identifierIDRef = item.Attributes["id"].Name; CreditSupportAgreementIdentifier ob = CreditSupportAgreementIdentifier(); IDManager.SetID(identifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { identifierIDRef = item.Attributes["href"].Name; } else { identifier = new CreditSupportAgreementIdentifier(item); } } } }
public CreditSupportAgreement(XmlNode xmlNode) { XmlNodeList typeNodeList = xmlNode.SelectNodes("type"); if (typeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in typeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { typeIDRef = item.Attributes["id"].Name; CreditSupportAgreementType ob = CreditSupportAgreementType(); IDManager.SetID(typeIDRef, ob); } else if (item.Attributes.ToString() == "href") { typeIDRef = item.Attributes["href"].Name; } else { type = new CreditSupportAgreementType(item); } } } XmlNodeList dateNodeList = xmlNode.SelectNodes("date"); if (dateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(dateIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateIDRef = item.Attributes["href"].Name; } else { date = new XsdTypeDate(item); } } } XmlNodeList identifierNodeList = xmlNode.SelectNodes("identifier"); if (identifierNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in identifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { identifierIDRef = item.Attributes["id"].Name; CreditSupportAgreementIdentifier ob = CreditSupportAgreementIdentifier(); IDManager.SetID(identifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { identifierIDRef = item.Attributes["href"].Name; } else { identifier = new CreditSupportAgreementIdentifier(item); } } } }
public CreditSupportAgreement(XmlNode xmlNode) { XmlNode typeNode = xmlNode.SelectSingleNode("type"); if (typeNode != null) { if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) { if (typeNode.Attributes["id"] != null) { typeIDRef_ = typeNode.Attributes["id"].Value; CreditSupportAgreementType ob = new CreditSupportAgreementType(typeNode); IDManager.SetID(typeIDRef_, ob); } else if (typeNode.Attributes["href"] != null) { typeIDRef_ = typeNode.Attributes["href"].Value; } else { type_ = new CreditSupportAgreementType(typeNode); } } else { type_ = new CreditSupportAgreementType(typeNode); } } XmlNode dateNode = xmlNode.SelectSingleNode("date"); if (dateNode != null) { if (dateNode.Attributes["href"] != null || dateNode.Attributes["id"] != null) { if (dateNode.Attributes["id"] != null) { dateIDRef_ = dateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(dateNode); IDManager.SetID(dateIDRef_, ob); } else if (dateNode.Attributes["href"] != null) { dateIDRef_ = dateNode.Attributes["href"].Value; } else { date_ = new XsdTypeDate(dateNode); } } else { date_ = new XsdTypeDate(dateNode); } } XmlNode identifierNode = xmlNode.SelectSingleNode("identifier"); if (identifierNode != null) { if (identifierNode.Attributes["href"] != null || identifierNode.Attributes["id"] != null) { if (identifierNode.Attributes["id"] != null) { identifierIDRef_ = identifierNode.Attributes["id"].Value; CreditSupportAgreementIdentifier ob = new CreditSupportAgreementIdentifier(identifierNode); IDManager.SetID(identifierIDRef_, ob); } else if (identifierNode.Attributes["href"] != null) { identifierIDRef_ = identifierNode.Attributes["href"].Value; } else { identifier_ = new CreditSupportAgreementIdentifier(identifierNode); } } else { identifier_ = new CreditSupportAgreementIdentifier(identifierNode); } } }