public TradeDifference(XmlNode xmlNode) { XmlNode differenceTypeNode = xmlNode.SelectSingleNode("differenceType"); if (differenceTypeNode != null) { if (differenceTypeNode.Attributes["href"] != null || differenceTypeNode.Attributes["id"] != null) { if (differenceTypeNode.Attributes["id"] != null) { differenceTypeIDRef_ = differenceTypeNode.Attributes["id"].Value; DifferenceTypeEnum ob = new DifferenceTypeEnum(differenceTypeNode); IDManager.SetID(differenceTypeIDRef_, ob); } else if (differenceTypeNode.Attributes["href"] != null) { differenceTypeIDRef_ = differenceTypeNode.Attributes["href"].Value; } else { differenceType_ = new DifferenceTypeEnum(differenceTypeNode); } } else { differenceType_ = new DifferenceTypeEnum(differenceTypeNode); } } XmlNode differenceSeverityNode = xmlNode.SelectSingleNode("differenceSeverity"); if (differenceSeverityNode != null) { if (differenceSeverityNode.Attributes["href"] != null || differenceSeverityNode.Attributes["id"] != null) { if (differenceSeverityNode.Attributes["id"] != null) { differenceSeverityIDRef_ = differenceSeverityNode.Attributes["id"].Value; DifferenceSeverityEnum ob = new DifferenceSeverityEnum(differenceSeverityNode); IDManager.SetID(differenceSeverityIDRef_, ob); } else if (differenceSeverityNode.Attributes["href"] != null) { differenceSeverityIDRef_ = differenceSeverityNode.Attributes["href"].Value; } else { differenceSeverity_ = new DifferenceSeverityEnum(differenceSeverityNode); } } else { differenceSeverity_ = new DifferenceSeverityEnum(differenceSeverityNode); } } XmlNode elementNode = xmlNode.SelectSingleNode("element"); if (elementNode != null) { if (elementNode.Attributes["href"] != null || elementNode.Attributes["id"] != null) { if (elementNode.Attributes["id"] != null) { elementIDRef_ = elementNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(elementNode); IDManager.SetID(elementIDRef_, ob); } else if (elementNode.Attributes["href"] != null) { elementIDRef_ = elementNode.Attributes["href"].Value; } else { element_ = new XsdTypeString(elementNode); } } else { element_ = new XsdTypeString(elementNode); } } XmlNode basePathNode = xmlNode.SelectSingleNode("basePath"); if (basePathNode != null) { if (basePathNode.Attributes["href"] != null || basePathNode.Attributes["id"] != null) { if (basePathNode.Attributes["id"] != null) { basePathIDRef_ = basePathNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(basePathNode); IDManager.SetID(basePathIDRef_, ob); } else if (basePathNode.Attributes["href"] != null) { basePathIDRef_ = basePathNode.Attributes["href"].Value; } else { basePath_ = new XsdTypeString(basePathNode); } } else { basePath_ = new XsdTypeString(basePathNode); } } XmlNode baseValueNode = xmlNode.SelectSingleNode("baseValue"); if (baseValueNode != null) { if (baseValueNode.Attributes["href"] != null || baseValueNode.Attributes["id"] != null) { if (baseValueNode.Attributes["id"] != null) { baseValueIDRef_ = baseValueNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(baseValueNode); IDManager.SetID(baseValueIDRef_, ob); } else if (baseValueNode.Attributes["href"] != null) { baseValueIDRef_ = baseValueNode.Attributes["href"].Value; } else { baseValue_ = new XsdTypeString(baseValueNode); } } else { baseValue_ = new XsdTypeString(baseValueNode); } } XmlNode otherPathNode = xmlNode.SelectSingleNode("otherPath"); if (otherPathNode != null) { if (otherPathNode.Attributes["href"] != null || otherPathNode.Attributes["id"] != null) { if (otherPathNode.Attributes["id"] != null) { otherPathIDRef_ = otherPathNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(otherPathNode); IDManager.SetID(otherPathIDRef_, ob); } else if (otherPathNode.Attributes["href"] != null) { otherPathIDRef_ = otherPathNode.Attributes["href"].Value; } else { otherPath_ = new XsdTypeString(otherPathNode); } } else { otherPath_ = new XsdTypeString(otherPathNode); } } XmlNode otherValueNode = xmlNode.SelectSingleNode("otherValue"); if (otherValueNode != null) { if (otherValueNode.Attributes["href"] != null || otherValueNode.Attributes["id"] != null) { if (otherValueNode.Attributes["id"] != null) { otherValueIDRef_ = otherValueNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(otherValueNode); IDManager.SetID(otherValueIDRef_, ob); } else if (otherValueNode.Attributes["href"] != null) { otherValueIDRef_ = otherValueNode.Attributes["href"].Value; } else { otherValue_ = new XsdTypeString(otherValueNode); } } else { otherValue_ = new XsdTypeString(otherValueNode); } } XmlNodeList missingElementNodeList = xmlNode.SelectNodes("missingElement"); if (missingElementNodeList != null) { this.missingElement_ = new List <XsdTypeString>(); foreach (XmlNode item in missingElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { missingElementIDRef_ = item.Attributes["id"].Value; missingElement_.Add(new XsdTypeString(item)); IDManager.SetID(missingElementIDRef_, missingElement_[missingElement_.Count - 1]); } else if (item.Attributes["href"] != null) { missingElementIDRef_ = item.Attributes["href"].Value; } else { missingElement_.Add(new XsdTypeString(item)); } } else { missingElement_.Add(new XsdTypeString(item)); } } } XmlNodeList extraElementNodeList = xmlNode.SelectNodes("extraElement"); if (extraElementNodeList != null) { this.extraElement_ = new List <XsdTypeString>(); foreach (XmlNode item in extraElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { extraElementIDRef_ = item.Attributes["id"].Value; extraElement_.Add(new XsdTypeString(item)); IDManager.SetID(extraElementIDRef_, extraElement_[extraElement_.Count - 1]); } else if (item.Attributes["href"] != null) { extraElementIDRef_ = item.Attributes["href"].Value; } else { extraElement_.Add(new XsdTypeString(item)); } } else { extraElement_.Add(new XsdTypeString(item)); } } } XmlNode messageNode = xmlNode.SelectSingleNode("message"); if (messageNode != null) { if (messageNode.Attributes["href"] != null || messageNode.Attributes["id"] != null) { if (messageNode.Attributes["id"] != null) { messageIDRef_ = messageNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(messageNode); IDManager.SetID(messageIDRef_, ob); } else if (messageNode.Attributes["href"] != null) { messageIDRef_ = messageNode.Attributes["href"].Value; } else { message_ = new XsdTypeString(messageNode); } } else { message_ = new XsdTypeString(messageNode); } } }
public TradeDifference(XmlNode xmlNode) { XmlNode differenceTypeNode = xmlNode.SelectSingleNode("differenceType"); if (differenceTypeNode != null) { if (differenceTypeNode.Attributes["href"] != null || differenceTypeNode.Attributes["id"] != null) { if (differenceTypeNode.Attributes["id"] != null) { differenceTypeIDRef_ = differenceTypeNode.Attributes["id"].Value; DifferenceTypeEnum ob = new DifferenceTypeEnum(differenceTypeNode); IDManager.SetID(differenceTypeIDRef_, ob); } else if (differenceTypeNode.Attributes["href"] != null) { differenceTypeIDRef_ = differenceTypeNode.Attributes["href"].Value; } else { differenceType_ = new DifferenceTypeEnum(differenceTypeNode); } } else { differenceType_ = new DifferenceTypeEnum(differenceTypeNode); } } XmlNode differenceSeverityNode = xmlNode.SelectSingleNode("differenceSeverity"); if (differenceSeverityNode != null) { if (differenceSeverityNode.Attributes["href"] != null || differenceSeverityNode.Attributes["id"] != null) { if (differenceSeverityNode.Attributes["id"] != null) { differenceSeverityIDRef_ = differenceSeverityNode.Attributes["id"].Value; DifferenceSeverityEnum ob = new DifferenceSeverityEnum(differenceSeverityNode); IDManager.SetID(differenceSeverityIDRef_, ob); } else if (differenceSeverityNode.Attributes["href"] != null) { differenceSeverityIDRef_ = differenceSeverityNode.Attributes["href"].Value; } else { differenceSeverity_ = new DifferenceSeverityEnum(differenceSeverityNode); } } else { differenceSeverity_ = new DifferenceSeverityEnum(differenceSeverityNode); } } XmlNode elementNode = xmlNode.SelectSingleNode("element"); if (elementNode != null) { if (elementNode.Attributes["href"] != null || elementNode.Attributes["id"] != null) { if (elementNode.Attributes["id"] != null) { elementIDRef_ = elementNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(elementNode); IDManager.SetID(elementIDRef_, ob); } else if (elementNode.Attributes["href"] != null) { elementIDRef_ = elementNode.Attributes["href"].Value; } else { element_ = new XsdTypeString(elementNode); } } else { element_ = new XsdTypeString(elementNode); } } XmlNode basePathNode = xmlNode.SelectSingleNode("basePath"); if (basePathNode != null) { if (basePathNode.Attributes["href"] != null || basePathNode.Attributes["id"] != null) { if (basePathNode.Attributes["id"] != null) { basePathIDRef_ = basePathNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(basePathNode); IDManager.SetID(basePathIDRef_, ob); } else if (basePathNode.Attributes["href"] != null) { basePathIDRef_ = basePathNode.Attributes["href"].Value; } else { basePath_ = new XsdTypeString(basePathNode); } } else { basePath_ = new XsdTypeString(basePathNode); } } XmlNode baseValueNode = xmlNode.SelectSingleNode("baseValue"); if (baseValueNode != null) { if (baseValueNode.Attributes["href"] != null || baseValueNode.Attributes["id"] != null) { if (baseValueNode.Attributes["id"] != null) { baseValueIDRef_ = baseValueNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(baseValueNode); IDManager.SetID(baseValueIDRef_, ob); } else if (baseValueNode.Attributes["href"] != null) { baseValueIDRef_ = baseValueNode.Attributes["href"].Value; } else { baseValue_ = new XsdTypeString(baseValueNode); } } else { baseValue_ = new XsdTypeString(baseValueNode); } } XmlNode otherPathNode = xmlNode.SelectSingleNode("otherPath"); if (otherPathNode != null) { if (otherPathNode.Attributes["href"] != null || otherPathNode.Attributes["id"] != null) { if (otherPathNode.Attributes["id"] != null) { otherPathIDRef_ = otherPathNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(otherPathNode); IDManager.SetID(otherPathIDRef_, ob); } else if (otherPathNode.Attributes["href"] != null) { otherPathIDRef_ = otherPathNode.Attributes["href"].Value; } else { otherPath_ = new XsdTypeString(otherPathNode); } } else { otherPath_ = new XsdTypeString(otherPathNode); } } XmlNode otherValueNode = xmlNode.SelectSingleNode("otherValue"); if (otherValueNode != null) { if (otherValueNode.Attributes["href"] != null || otherValueNode.Attributes["id"] != null) { if (otherValueNode.Attributes["id"] != null) { otherValueIDRef_ = otherValueNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(otherValueNode); IDManager.SetID(otherValueIDRef_, ob); } else if (otherValueNode.Attributes["href"] != null) { otherValueIDRef_ = otherValueNode.Attributes["href"].Value; } else { otherValue_ = new XsdTypeString(otherValueNode); } } else { otherValue_ = new XsdTypeString(otherValueNode); } } XmlNodeList missingElementNodeList = xmlNode.SelectNodes("missingElement"); if (missingElementNodeList != null) { this.missingElement_ = new List<XsdTypeString>(); foreach (XmlNode item in missingElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { missingElementIDRef_ = item.Attributes["id"].Value; missingElement_.Add(new XsdTypeString(item)); IDManager.SetID(missingElementIDRef_, missingElement_[missingElement_.Count - 1 ]); } else if (item.Attributes["href"] != null) { missingElementIDRef_ = item.Attributes["href"].Value; } else { missingElement_.Add(new XsdTypeString(item)); } } else { missingElement_.Add(new XsdTypeString(item)); } } } XmlNodeList extraElementNodeList = xmlNode.SelectNodes("extraElement"); if (extraElementNodeList != null) { this.extraElement_ = new List<XsdTypeString>(); foreach (XmlNode item in extraElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { extraElementIDRef_ = item.Attributes["id"].Value; extraElement_.Add(new XsdTypeString(item)); IDManager.SetID(extraElementIDRef_, extraElement_[extraElement_.Count - 1 ]); } else if (item.Attributes["href"] != null) { extraElementIDRef_ = item.Attributes["href"].Value; } else { extraElement_.Add(new XsdTypeString(item)); } } else { extraElement_.Add(new XsdTypeString(item)); } } } XmlNode messageNode = xmlNode.SelectSingleNode("message"); if (messageNode != null) { if (messageNode.Attributes["href"] != null || messageNode.Attributes["id"] != null) { if (messageNode.Attributes["id"] != null) { messageIDRef_ = messageNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(messageNode); IDManager.SetID(messageIDRef_, ob); } else if (messageNode.Attributes["href"] != null) { messageIDRef_ = messageNode.Attributes["href"].Value; } else { message_ = new XsdTypeString(messageNode); } } else { message_ = new XsdTypeString(messageNode); } } }
public TradeDifference(XmlNode xmlNode) { XmlNodeList differenceTypeNodeList = xmlNode.SelectNodes("differenceType"); if (differenceTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in differenceTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { differenceTypeIDRef = item.Attributes["id"].Name; DifferenceTypeEnum ob = DifferenceTypeEnum(); IDManager.SetID(differenceTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { differenceTypeIDRef = item.Attributes["href"].Name; } else { differenceType = new DifferenceTypeEnum(item); } } } XmlNodeList differenceSeverityNodeList = xmlNode.SelectNodes("differenceSeverity"); if (differenceSeverityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in differenceSeverityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { differenceSeverityIDRef = item.Attributes["id"].Name; DifferenceSeverityEnum ob = DifferenceSeverityEnum(); IDManager.SetID(differenceSeverityIDRef, ob); } else if (item.Attributes.ToString() == "href") { differenceSeverityIDRef = item.Attributes["href"].Name; } else { differenceSeverity = new DifferenceSeverityEnum(item); } } } XmlNodeList elementNodeList = xmlNode.SelectNodes("element"); if (elementNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in elementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { elementIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(elementIDRef, ob); } else if (item.Attributes.ToString() == "href") { elementIDRef = item.Attributes["href"].Name; } else { element = new XsdTypeString(item); } } } XmlNodeList basePathNodeList = xmlNode.SelectNodes("basePath"); if (basePathNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in basePathNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { basePathIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(basePathIDRef, ob); } else if (item.Attributes.ToString() == "href") { basePathIDRef = item.Attributes["href"].Name; } else { basePath = new XsdTypeString(item); } } } XmlNodeList baseValueNodeList = xmlNode.SelectNodes("baseValue"); if (baseValueNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in baseValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { baseValueIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(baseValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { baseValueIDRef = item.Attributes["href"].Name; } else { baseValue = new XsdTypeString(item); } } } XmlNodeList otherPathNodeList = xmlNode.SelectNodes("otherPath"); if (otherPathNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in otherPathNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { otherPathIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(otherPathIDRef, ob); } else if (item.Attributes.ToString() == "href") { otherPathIDRef = item.Attributes["href"].Name; } else { otherPath = new XsdTypeString(item); } } } XmlNodeList otherValueNodeList = xmlNode.SelectNodes("otherValue"); if (otherValueNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in otherValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { otherValueIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(otherValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { otherValueIDRef = item.Attributes["href"].Name; } else { otherValue = new XsdTypeString(item); } } } XmlNodeList missingElementNodeList = xmlNode.SelectNodes("missingElement"); foreach (XmlNode item in missingElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { missingElementIDRef = item.Attributes["id"].Name; XsdTypeString ob = new XsdTypeString(); ob.Add(new XsdTypeString(item)); IDManager.SetID(missingElementIDRef, ob); } else if (item.Attributes.ToString() == "href") { missingElementIDRef = item.Attributes["href"].Name; } else { missingElement.Add(new XsdTypeString(item)); } } } XmlNodeList extraElementNodeList = xmlNode.SelectNodes("extraElement"); foreach (XmlNode item in extraElementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { extraElementIDRef = item.Attributes["id"].Name; XsdTypeString ob = new XsdTypeString(); ob.Add(new XsdTypeString(item)); IDManager.SetID(extraElementIDRef, ob); } else if (item.Attributes.ToString() == "href") { extraElementIDRef = item.Attributes["href"].Name; } else { extraElement.Add(new XsdTypeString(item)); } } } XmlNodeList messageNodeList = xmlNode.SelectNodes("message"); if (messageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in messageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { messageIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(messageIDRef, ob); } else if (item.Attributes.ToString() == "href") { messageIDRef = item.Attributes["href"].Name; } else { message = new XsdTypeString(item); } } } }