public DeClear(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef = item.Attributes["id"].Name; List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>(); ob.Add(new PartyTradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIdentifierIDRef = item.Attributes["href"].Name; } else { tradeIdentifier.Add(new PartyTradeIdentifier(item)); } } } XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new XsdTypeDate(item); } } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); if (reasonNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { reasonIDRef = item.Attributes["id"].Name; DeclearReason ob = DeclearReason(); IDManager.SetID(reasonIDRef, ob); } else if (item.Attributes.ToString() == "href") { reasonIDRef = item.Attributes["href"].Name; } else { reason = new DeclearReason(item); } } } }
public DeClear(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); if (tradeIdentifierNodeList != null) { this.tradeIdentifier_ = new List<PartyTradeIdentifier>(); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef_ = item.Attributes["id"].Value; tradeIdentifier_.Add(new PartyTradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1 ]); } else if (item.Attributes["href"] != null) { tradeIdentifierIDRef_ = item.Attributes["href"].Value; } else { tradeIdentifier_.Add(new PartyTradeIdentifier(item)); } } else { tradeIdentifier_.Add(new PartyTradeIdentifier(item)); } } } XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new XsdTypeDate(effectiveDateNode); } } else { effectiveDate_ = new XsdTypeDate(effectiveDateNode); } } XmlNode reasonNode = xmlNode.SelectSingleNode("reason"); if (reasonNode != null) { if (reasonNode.Attributes["href"] != null || reasonNode.Attributes["id"] != null) { if (reasonNode.Attributes["id"] != null) { reasonIDRef_ = reasonNode.Attributes["id"].Value; DeclearReason ob = new DeclearReason(reasonNode); IDManager.SetID(reasonIDRef_, ob); } else if (reasonNode.Attributes["href"] != null) { reasonIDRef_ = reasonNode.Attributes["href"].Value; } else { reason_ = new DeclearReason(reasonNode); } } else { reason_ = new DeclearReason(reasonNode); } } }
public DeClear(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef = item.Attributes["id"].Name; List <PartyTradeIdentifier> ob = new List <PartyTradeIdentifier>(); ob.Add(new PartyTradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIdentifierIDRef = item.Attributes["href"].Name; } else { tradeIdentifier.Add(new PartyTradeIdentifier(item)); } } } XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new XsdTypeDate(item); } } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); if (reasonNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { reasonIDRef = item.Attributes["id"].Name; DeclearReason ob = DeclearReason(); IDManager.SetID(reasonIDRef, ob); } else if (item.Attributes.ToString() == "href") { reasonIDRef = item.Attributes["href"].Name; } else { reason = new DeclearReason(item); } } } }
public DeClear(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); if (tradeIdentifierNodeList != null) { this.tradeIdentifier_ = new List <PartyTradeIdentifier>(); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef_ = item.Attributes["id"].Value; tradeIdentifier_.Add(new PartyTradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1]); } else if (item.Attributes["href"] != null) { tradeIdentifierIDRef_ = item.Attributes["href"].Value; } else { tradeIdentifier_.Add(new PartyTradeIdentifier(item)); } } else { tradeIdentifier_.Add(new PartyTradeIdentifier(item)); } } } XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new XsdTypeDate(effectiveDateNode); } } else { effectiveDate_ = new XsdTypeDate(effectiveDateNode); } } XmlNode reasonNode = xmlNode.SelectSingleNode("reason"); if (reasonNode != null) { if (reasonNode.Attributes["href"] != null || reasonNode.Attributes["id"] != null) { if (reasonNode.Attributes["id"] != null) { reasonIDRef_ = reasonNode.Attributes["id"].Value; DeclearReason ob = new DeclearReason(reasonNode); IDManager.SetID(reasonIDRef_, ob); } else if (reasonNode.Attributes["href"] != null) { reasonIDRef_ = reasonNode.Attributes["href"].Value; } else { reason_ = new DeclearReason(reasonNode); } } else { reason_ = new DeclearReason(reasonNode); } } }