public FxCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
 }
示例#2
0
        public FxCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }
        }
 public FxRateAsset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");
     
     if (rateSourceNode != null)
     {
         if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null) 
         {
             if (rateSourceNode.Attributes["id"] != null) 
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                 FxSpotRateSource ob = new FxSpotRateSource(rateSourceNode);
                 IDManager.SetID(rateSourceIDRef_, ob);
             }
             else if (rateSourceNode.Attributes["href"] != null)
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 rateSource_ = new FxSpotRateSource(rateSourceNode);
             }
         }
         else
         {
             rateSource_ = new FxSpotRateSource(rateSourceNode);
         }
     }
     
 
 }
示例#4
0
        public FxCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }
        }
        public FxRateAsset(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList rateSourceNodeList = xmlNode.SelectNodes("rateSource");

            if (rateSourceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in rateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateSourceIDRef = item.Attributes["id"].Name;
                        FxSpotRateSource ob = FxSpotRateSource();
                        IDManager.SetID(rateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateSource = new FxSpotRateSource(item);
                    }
                }
            }
        }
 public FxCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
 }
 public FxRateAsset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList rateSourceNodeList = xmlNode.SelectNodes("rateSource");
     if (rateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateSourceIDRef = item.Attributes["id"].Name;
                 FxSpotRateSource ob = FxSpotRateSource();
                 IDManager.SetID(rateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateSource = new FxSpotRateSource(item);
             }
         }
     }
     
 
 }
 public FxRate(XmlNode xmlNode)
 {
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");
     if (rateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(rateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
 }
        public FxRate(XmlNode xmlNode)
        {
            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");

            if (rateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in rateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(rateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rate = new XsdTypeDecimal(item);
                    }
                }
            }
        }
 public FxRate(XmlNode xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode rateNode = xmlNode.SelectSingleNode("rate");
     
     if (rateNode != null)
     {
         if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null) 
         {
             if (rateNode.Attributes["id"] != null) 
             {
                 rateIDRef_ = rateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(rateNode);
                 IDManager.SetID(rateIDRef_, ob);
             }
             else if (rateNode.Attributes["href"] != null)
             {
                 rateIDRef_ = rateNode.Attributes["href"].Value;
             }
             else
             {
                 rate_ = new XsdTypeDecimal(rateNode);
             }
         }
         else
         {
             rate_ = new XsdTypeDecimal(rateNode);
         }
     }
     
 
 }
示例#11
0
        public FxRateAsset(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");

            if (rateSourceNode != null)
            {
                if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null)
                {
                    if (rateSourceNode.Attributes["id"] != null)
                    {
                        rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                        FxSpotRateSource ob = new FxSpotRateSource(rateSourceNode);
                        IDManager.SetID(rateSourceIDRef_, ob);
                    }
                    else if (rateSourceNode.Attributes["href"] != null)
                    {
                        rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateSource_ = new FxSpotRateSource(rateSourceNode);
                    }
                }
                else
                {
                    rateSource_ = new FxSpotRateSource(rateSourceNode);
                }
            }
        }
        public FxRate(XmlNode xmlNode)
        {
            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode rateNode = xmlNode.SelectSingleNode("rate");

            if (rateNode != null)
            {
                if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null)
                {
                    if (rateNode.Attributes["id"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(rateNode);
                        IDManager.SetID(rateIDRef_, ob);
                    }
                    else if (rateNode.Attributes["href"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rate_ = new XsdTypeDecimal(rateNode);
                    }
                }
                else
                {
                    rate_ = new XsdTypeDecimal(rateNode);
                }
            }
        }
示例#13
0
        public ExchangeRate(XmlNode xmlNode)
        {
            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");

            if (rateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in rateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(rateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");

            if (spotRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in spotRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(spotRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList forwardPointsNodeList = xmlNode.SelectNodes("forwardPoints");

            if (forwardPointsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in forwardPointsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        forwardPointsIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(forwardPointsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        forwardPointsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        forwardPoints = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList pointValueNodeList = xmlNode.SelectNodes("pointValue");

            if (pointValueNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in pointValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pointValueIDRef = item.Attributes["id"].Name;
                        PointValue ob = PointValue();
                        IDManager.SetID(pointValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pointValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pointValue = new PointValue(item);
                    }
                }
            }


            XmlNodeList crossRateNodeList = xmlNode.SelectNodes("crossRate");

            foreach (XmlNode item in crossRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        crossRateIDRef = item.Attributes["id"].Name;
                        List <CrossRate> ob = new List <CrossRate>();
                        ob.Add(new CrossRate(item));
                        IDManager.SetID(crossRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        crossRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        crossRate.Add(new CrossRate(item));
                    }
                }
            }
        }
        public FxTrigger(XmlNode xmlNode)
        {
            XmlNode triggerConditionNode = xmlNode.SelectSingleNode("triggerCondition");

            if (triggerConditionNode != null)
            {
                if (triggerConditionNode.Attributes["href"] != null || triggerConditionNode.Attributes["id"] != null)
                {
                    if (triggerConditionNode.Attributes["id"] != null)
                    {
                        triggerConditionIDRef_ = triggerConditionNode.Attributes["id"].Value;
                        TriggerConditionEnum ob = new TriggerConditionEnum(triggerConditionNode);
                        IDManager.SetID(triggerConditionIDRef_, ob);
                    }
                    else if (triggerConditionNode.Attributes["href"] != null)
                    {
                        triggerConditionIDRef_ = triggerConditionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerCondition_ = new TriggerConditionEnum(triggerConditionNode);
                    }
                }
                else
                {
                    triggerCondition_ = new TriggerConditionEnum(triggerConditionNode);
                }
            }


            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");

            if (triggerRateNode != null)
            {
                if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null)
                {
                    if (triggerRateNode.Attributes["id"] != null)
                    {
                        triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                        IDManager.SetID(triggerRateIDRef_, ob);
                    }
                    else if (triggerRateNode.Attributes["href"] != null)
                    {
                        triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerRate_ = new PositiveDecimal(triggerRateNode);
                    }
                }
                else
                {
                    triggerRate_ = new PositiveDecimal(triggerRateNode);
                }
            }


            XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");

            if (spotRateNode != null)
            {
                if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null)
                {
                    if (spotRateNode.Attributes["id"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                        IDManager.SetID(spotRateIDRef_, ob);
                    }
                    else if (spotRateNode.Attributes["href"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotRate_ = new PositiveDecimal(spotRateNode);
                    }
                }
                else
                {
                    spotRate_ = new PositiveDecimal(spotRateNode);
                }
            }


            XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");

            if (informationSourceNodeList != null)
            {
                this.informationSource_ = new List <InformationSource>();
                foreach (XmlNode item in informationSourceNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            informationSourceIDRef_ = item.Attributes["id"].Value;
                            informationSource_.Add(new InformationSource(item));
                            IDManager.SetID(informationSourceIDRef_, informationSource_[informationSource_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            informationSourceIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            informationSource_.Add(new InformationSource(item));
                        }
                    }
                    else
                    {
                        informationSource_.Add(new InformationSource(item));
                    }
                }
            }
        }
 public FxBarrierFeature(XmlNode xmlNode)
 {
     XmlNode barrierTypeNode = xmlNode.SelectSingleNode("barrierType");
     
     if (barrierTypeNode != null)
     {
         if (barrierTypeNode.Attributes["href"] != null || barrierTypeNode.Attributes["id"] != null) 
         {
             if (barrierTypeNode.Attributes["id"] != null) 
             {
                 barrierTypeIDRef_ = barrierTypeNode.Attributes["id"].Value;
                 FxBarrierTypeEnum ob = new FxBarrierTypeEnum(barrierTypeNode);
                 IDManager.SetID(barrierTypeIDRef_, ob);
             }
             else if (barrierTypeNode.Attributes["href"] != null)
             {
                 barrierTypeIDRef_ = barrierTypeNode.Attributes["href"].Value;
             }
             else
             {
                 barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
             }
         }
         else
         {
             barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
         }
     }
     
 
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");
     
     if (triggerRateNode != null)
     {
         if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null) 
         {
             if (triggerRateNode.Attributes["id"] != null) 
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                 IDManager.SetID(triggerRateIDRef_, ob);
             }
             else if (triggerRateNode.Attributes["href"] != null)
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
             }
             else
             {
                 triggerRate_ = new PositiveDecimal(triggerRateNode);
             }
         }
         else
         {
             triggerRate_ = new PositiveDecimal(triggerRateNode);
         }
     }
     
 
     XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");
     
     if (informationSourceNodeList != null)
     {
         this.informationSource_ = new List<InformationSource>();
         foreach (XmlNode item in informationSourceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     informationSourceIDRef_ = item.Attributes["id"].Value;
                     informationSource_.Add(new InformationSource(item));
                     IDManager.SetID(informationSourceIDRef_, informationSource_[informationSource_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     informationSourceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 informationSource_.Add(new InformationSource(item));
                 }
             }
             else
             {
                 informationSource_.Add(new InformationSource(item));
             }
         }
     }
     
 
     XmlNode observationStartDateNode = xmlNode.SelectSingleNode("observationStartDate");
     
     if (observationStartDateNode != null)
     {
         if (observationStartDateNode.Attributes["href"] != null || observationStartDateNode.Attributes["id"] != null) 
         {
             if (observationStartDateNode.Attributes["id"] != null) 
             {
                 observationStartDateIDRef_ = observationStartDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(observationStartDateNode);
                 IDManager.SetID(observationStartDateIDRef_, ob);
             }
             else if (observationStartDateNode.Attributes["href"] != null)
             {
                 observationStartDateIDRef_ = observationStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 observationStartDate_ = new XsdTypeDate(observationStartDateNode);
             }
         }
         else
         {
             observationStartDate_ = new XsdTypeDate(observationStartDateNode);
         }
     }
     
 
     XmlNode observationEndDateNode = xmlNode.SelectSingleNode("observationEndDate");
     
     if (observationEndDateNode != null)
     {
         if (observationEndDateNode.Attributes["href"] != null || observationEndDateNode.Attributes["id"] != null) 
         {
             if (observationEndDateNode.Attributes["id"] != null) 
             {
                 observationEndDateIDRef_ = observationEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(observationEndDateNode);
                 IDManager.SetID(observationEndDateIDRef_, ob);
             }
             else if (observationEndDateNode.Attributes["href"] != null)
             {
                 observationEndDateIDRef_ = observationEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 observationEndDate_ = new XsdTypeDate(observationEndDateNode);
             }
         }
         else
         {
             observationEndDate_ = new XsdTypeDate(observationEndDateNode);
         }
     }
     
 
 }
        public TradeUnderlyer2(XmlNode xmlNode)
        {
            XmlNode floatingRateNode = xmlNode.SelectSingleNode("floatingRate");

            if (floatingRateNode != null)
            {
                if (floatingRateNode.Attributes["href"] != null || floatingRateNode.Attributes["id"] != null)
                {
                    if (floatingRateNode.Attributes["id"] != null)
                    {
                        floatingRateIDRef_ = floatingRateNode.Attributes["id"].Value;
                        FloatingRate ob = new FloatingRate(floatingRateNode);
                        IDManager.SetID(floatingRateIDRef_, ob);
                    }
                    else if (floatingRateNode.Attributes["href"] != null)
                    {
                        floatingRateIDRef_ = floatingRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRate_ = new FloatingRate(floatingRateNode);
                    }
                }
                else
                {
                    floatingRate_ = new FloatingRate(floatingRateNode);
                }
            }


            XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");

            if (fixedRateNode != null)
            {
                if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null)
                {
                    if (fixedRateNode.Attributes["id"] != null)
                    {
                        fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                        Schedule ob = new Schedule(fixedRateNode);
                        IDManager.SetID(fixedRateIDRef_, ob);
                    }
                    else if (fixedRateNode.Attributes["href"] != null)
                    {
                        fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixedRate_ = new Schedule(fixedRateNode);
                    }
                }
                else
                {
                    fixedRate_ = new Schedule(fixedRateNode);
                }
            }


            XmlNode underlyingAssetNode = xmlNode.SelectSingleNode("underlyingAsset");

            if (underlyingAssetNode != null)
            {
                if (underlyingAssetNode.Attributes["href"] != null || underlyingAssetNode.Attributes["id"] != null)
                {
                    if (underlyingAssetNode.Attributes["id"] != null)
                    {
                        underlyingAssetIDRef_ = underlyingAssetNode.Attributes["id"].Value;
                        Asset ob = new Asset(underlyingAssetNode);
                        IDManager.SetID(underlyingAssetIDRef_, ob);
                    }
                    else if (underlyingAssetNode.Attributes["href"] != null)
                    {
                        underlyingAssetIDRef_ = underlyingAssetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        underlyingAsset_ = new Asset(underlyingAssetNode);
                    }
                }
                else
                {
                    underlyingAsset_ = new Asset(underlyingAssetNode);
                }
            }


            XmlNode basketNode = xmlNode.SelectSingleNode("basket");

            if (basketNode != null)
            {
                if (basketNode.Attributes["href"] != null || basketNode.Attributes["id"] != null)
                {
                    if (basketNode.Attributes["id"] != null)
                    {
                        basketIDRef_ = basketNode.Attributes["id"].Value;
                        Basket ob = new Basket(basketNode);
                        IDManager.SetID(basketIDRef_, ob);
                    }
                    else if (basketNode.Attributes["href"] != null)
                    {
                        basketIDRef_ = basketNode.Attributes["href"].Value;
                    }
                    else
                    {
                        basket_ = new Basket(basketNode);
                    }
                }
                else
                {
                    basket_ = new Basket(basketNode);
                }
            }


            XmlNode bondNode = xmlNode.SelectSingleNode("bond");

            if (bondNode != null)
            {
                if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null)
                {
                    if (bondNode.Attributes["id"] != null)
                    {
                        bondIDRef_ = bondNode.Attributes["id"].Value;
                        Bond ob = new Bond(bondNode);
                        IDManager.SetID(bondIDRef_, ob);
                    }
                    else if (bondNode.Attributes["href"] != null)
                    {
                        bondIDRef_ = bondNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bond_ = new Bond(bondNode);
                    }
                }
                else
                {
                    bond_ = new Bond(bondNode);
                }
            }


            XmlNode cashNode = xmlNode.SelectSingleNode("cash");

            if (cashNode != null)
            {
                if (cashNode.Attributes["href"] != null || cashNode.Attributes["id"] != null)
                {
                    if (cashNode.Attributes["id"] != null)
                    {
                        cashIDRef_ = cashNode.Attributes["id"].Value;
                        Cash ob = new Cash(cashNode);
                        IDManager.SetID(cashIDRef_, ob);
                    }
                    else if (cashNode.Attributes["href"] != null)
                    {
                        cashIDRef_ = cashNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cash_ = new Cash(cashNode);
                    }
                }
                else
                {
                    cash_ = new Cash(cashNode);
                }
            }


            XmlNode commodityNode = xmlNode.SelectSingleNode("commodity");

            if (commodityNode != null)
            {
                if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null)
                {
                    if (commodityNode.Attributes["id"] != null)
                    {
                        commodityIDRef_ = commodityNode.Attributes["id"].Value;
                        Commodity ob = new Commodity(commodityNode);
                        IDManager.SetID(commodityIDRef_, ob);
                    }
                    else if (commodityNode.Attributes["href"] != null)
                    {
                        commodityIDRef_ = commodityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commodity_ = new Commodity(commodityNode);
                    }
                }
                else
                {
                    commodity_ = new Commodity(commodityNode);
                }
            }


            XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");

            if (convertibleBondNode != null)
            {
                if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null)
                {
                    if (convertibleBondNode.Attributes["id"] != null)
                    {
                        convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                        ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                        IDManager.SetID(convertibleBondIDRef_, ob);
                    }
                    else if (convertibleBondNode.Attributes["href"] != null)
                    {
                        convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
                    }
                    else
                    {
                        convertibleBond_ = new ConvertibleBond(convertibleBondNode);
                    }
                }
                else
                {
                    convertibleBond_ = new ConvertibleBond(convertibleBondNode);
                }
            }


            XmlNode equityNode = xmlNode.SelectSingleNode("equity");

            if (equityNode != null)
            {
                if (equityNode.Attributes["href"] != null || equityNode.Attributes["id"] != null)
                {
                    if (equityNode.Attributes["id"] != null)
                    {
                        equityIDRef_ = equityNode.Attributes["id"].Value;
                        EquityAsset ob = new EquityAsset(equityNode);
                        IDManager.SetID(equityIDRef_, ob);
                    }
                    else if (equityNode.Attributes["href"] != null)
                    {
                        equityIDRef_ = equityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equity_ = new EquityAsset(equityNode);
                    }
                }
                else
                {
                    equity_ = new EquityAsset(equityNode);
                }
            }


            XmlNode exchangeTradedFundNode = xmlNode.SelectSingleNode("exchangeTradedFund");

            if (exchangeTradedFundNode != null)
            {
                if (exchangeTradedFundNode.Attributes["href"] != null || exchangeTradedFundNode.Attributes["id"] != null)
                {
                    if (exchangeTradedFundNode.Attributes["id"] != null)
                    {
                        exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["id"].Value;
                        ExchangeTradedFund ob = new ExchangeTradedFund(exchangeTradedFundNode);
                        IDManager.SetID(exchangeTradedFundIDRef_, ob);
                    }
                    else if (exchangeTradedFundNode.Attributes["href"] != null)
                    {
                        exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
                    }
                }
                else
                {
                    exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
                }
            }


            XmlNode futureNode = xmlNode.SelectSingleNode("future");

            if (futureNode != null)
            {
                if (futureNode.Attributes["href"] != null || futureNode.Attributes["id"] != null)
                {
                    if (futureNode.Attributes["id"] != null)
                    {
                        futureIDRef_ = futureNode.Attributes["id"].Value;
                        Future ob = new Future(futureNode);
                        IDManager.SetID(futureIDRef_, ob);
                    }
                    else if (futureNode.Attributes["href"] != null)
                    {
                        futureIDRef_ = futureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        future_ = new Future(futureNode);
                    }
                }
                else
                {
                    future_ = new Future(futureNode);
                }
            }


            XmlNode indexNode = xmlNode.SelectSingleNode("index");

            if (indexNode != null)
            {
                if (indexNode.Attributes["href"] != null || indexNode.Attributes["id"] != null)
                {
                    if (indexNode.Attributes["id"] != null)
                    {
                        indexIDRef_ = indexNode.Attributes["id"].Value;
                        Index ob = new Index(indexNode);
                        IDManager.SetID(indexIDRef_, ob);
                    }
                    else if (indexNode.Attributes["href"] != null)
                    {
                        indexIDRef_ = indexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        index_ = new Index(indexNode);
                    }
                }
                else
                {
                    index_ = new Index(indexNode);
                }
            }


            XmlNode loanNode = xmlNode.SelectSingleNode("loan");

            if (loanNode != null)
            {
                if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null)
                {
                    if (loanNode.Attributes["id"] != null)
                    {
                        loanIDRef_ = loanNode.Attributes["id"].Value;
                        Loan ob = new Loan(loanNode);
                        IDManager.SetID(loanIDRef_, ob);
                    }
                    else if (loanNode.Attributes["href"] != null)
                    {
                        loanIDRef_ = loanNode.Attributes["href"].Value;
                    }
                    else
                    {
                        loan_ = new Loan(loanNode);
                    }
                }
                else
                {
                    loan_ = new Loan(loanNode);
                }
            }


            XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");

            if (mortgageNode != null)
            {
                if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null)
                {
                    if (mortgageNode.Attributes["id"] != null)
                    {
                        mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                        Mortgage ob = new Mortgage(mortgageNode);
                        IDManager.SetID(mortgageIDRef_, ob);
                    }
                    else if (mortgageNode.Attributes["href"] != null)
                    {
                        mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mortgage_ = new Mortgage(mortgageNode);
                    }
                }
                else
                {
                    mortgage_ = new Mortgage(mortgageNode);
                }
            }


            XmlNode mutualFundNode = xmlNode.SelectSingleNode("mutualFund");

            if (mutualFundNode != null)
            {
                if (mutualFundNode.Attributes["href"] != null || mutualFundNode.Attributes["id"] != null)
                {
                    if (mutualFundNode.Attributes["id"] != null)
                    {
                        mutualFundIDRef_ = mutualFundNode.Attributes["id"].Value;
                        MutualFund ob = new MutualFund(mutualFundNode);
                        IDManager.SetID(mutualFundIDRef_, ob);
                    }
                    else if (mutualFundNode.Attributes["href"] != null)
                    {
                        mutualFundIDRef_ = mutualFundNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mutualFund_ = new MutualFund(mutualFundNode);
                    }
                }
                else
                {
                    mutualFund_ = new MutualFund(mutualFundNode);
                }
            }


            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");

            if (referenceEntityNode != null)
            {
                if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null)
                {
                    if (referenceEntityNode.Attributes["id"] != null)
                    {
                        referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                        LegalEntity ob = new LegalEntity(referenceEntityNode);
                        IDManager.SetID(referenceEntityIDRef_, ob);
                    }
                    else if (referenceEntityNode.Attributes["href"] != null)
                    {
                        referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceEntity_ = new LegalEntity(referenceEntityNode);
                    }
                }
                else
                {
                    referenceEntity_ = new LegalEntity(referenceEntityNode);
                }
            }


            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

            if (payerPartyReferenceNode != null)
            {
                if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (payerPartyReferenceNode.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(payerPartyReferenceNode);
                        IDManager.SetID(payerPartyReferenceIDRef_, ob);
                    }
                    else if (payerPartyReferenceNode.Attributes["href"] != null)
                    {
                        payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
                    }
                }
                else
                {
                    payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
                }
            }


            XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");

            if (payerAccountReferenceNode != null)
            {
                if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (payerAccountReferenceNode.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(payerAccountReferenceNode);
                        IDManager.SetID(payerAccountReferenceIDRef_, ob);
                    }
                    else if (payerAccountReferenceNode.Attributes["href"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                    }
                }
                else
                {
                    payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                }
            }


            XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");

            if (receiverPartyReferenceNode != null)
            {
                if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null)
                {
                    if (receiverPartyReferenceNode.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                        IDManager.SetID(receiverPartyReferenceIDRef_, ob);
                    }
                    else if (receiverPartyReferenceNode.Attributes["href"] != null)
                    {
                        receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
                    }
                }
                else
                {
                    receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
                }
            }


            XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");

            if (receiverAccountReferenceNode != null)
            {
                if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null)
                {
                    if (receiverAccountReferenceNode.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                        IDManager.SetID(receiverAccountReferenceIDRef_, ob);
                    }
                    else if (receiverAccountReferenceNode.Attributes["href"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                    }
                }
                else
                {
                    receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                }
            }
        }
示例#17
0
        public FxBarrierFeature(XmlNode xmlNode)
        {
            XmlNodeList barrierTypeNodeList = xmlNode.SelectNodes("barrierType");

            if (barrierTypeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in barrierTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        barrierTypeIDRef = item.Attributes["id"].Name;
                        FxBarrierTypeEnum ob = FxBarrierTypeEnum();
                        IDManager.SetID(barrierTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        barrierTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        barrierType = new FxBarrierTypeEnum(item);
                    }
                }
            }


            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList triggerRateNodeList = xmlNode.SelectNodes("triggerRate");

            if (triggerRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in triggerRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(triggerRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");

            foreach (XmlNode item in informationSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        informationSourceIDRef = item.Attributes["id"].Name;
                        List <InformationSource> ob = new List <InformationSource>();
                        ob.Add(new InformationSource(item));
                        IDManager.SetID(informationSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        informationSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        informationSource.Add(new InformationSource(item));
                    }
                }
            }


            XmlNodeList observationStartDateNodeList = xmlNode.SelectNodes("observationStartDate");

            if (observationStartDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in observationStartDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        observationStartDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(observationStartDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        observationStartDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        observationStartDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList observationEndDateNodeList = xmlNode.SelectNodes("observationEndDate");

            if (observationEndDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in observationEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        observationEndDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(observationEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        observationEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        observationEndDate = new XsdTypeDate(item);
                    }
                }
            }
        }
        public FxBarrierFeature(XmlNode xmlNode)
        {
            XmlNode barrierTypeNode = xmlNode.SelectSingleNode("barrierType");

            if (barrierTypeNode != null)
            {
                if (barrierTypeNode.Attributes["href"] != null || barrierTypeNode.Attributes["id"] != null)
                {
                    if (barrierTypeNode.Attributes["id"] != null)
                    {
                        barrierTypeIDRef_ = barrierTypeNode.Attributes["id"].Value;
                        FxBarrierTypeEnum ob = new FxBarrierTypeEnum(barrierTypeNode);
                        IDManager.SetID(barrierTypeIDRef_, ob);
                    }
                    else if (barrierTypeNode.Attributes["href"] != null)
                    {
                        barrierTypeIDRef_ = barrierTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
                    }
                }
                else
                {
                    barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
                }
            }


            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");

            if (triggerRateNode != null)
            {
                if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null)
                {
                    if (triggerRateNode.Attributes["id"] != null)
                    {
                        triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                        IDManager.SetID(triggerRateIDRef_, ob);
                    }
                    else if (triggerRateNode.Attributes["href"] != null)
                    {
                        triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerRate_ = new PositiveDecimal(triggerRateNode);
                    }
                }
                else
                {
                    triggerRate_ = new PositiveDecimal(triggerRateNode);
                }
            }


            XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");

            if (informationSourceNodeList != null)
            {
                this.informationSource_ = new List <InformationSource>();
                foreach (XmlNode item in informationSourceNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            informationSourceIDRef_ = item.Attributes["id"].Value;
                            informationSource_.Add(new InformationSource(item));
                            IDManager.SetID(informationSourceIDRef_, informationSource_[informationSource_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            informationSourceIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            informationSource_.Add(new InformationSource(item));
                        }
                    }
                    else
                    {
                        informationSource_.Add(new InformationSource(item));
                    }
                }
            }


            XmlNode observationStartDateNode = xmlNode.SelectSingleNode("observationStartDate");

            if (observationStartDateNode != null)
            {
                if (observationStartDateNode.Attributes["href"] != null || observationStartDateNode.Attributes["id"] != null)
                {
                    if (observationStartDateNode.Attributes["id"] != null)
                    {
                        observationStartDateIDRef_ = observationStartDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(observationStartDateNode);
                        IDManager.SetID(observationStartDateIDRef_, ob);
                    }
                    else if (observationStartDateNode.Attributes["href"] != null)
                    {
                        observationStartDateIDRef_ = observationStartDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationStartDate_ = new XsdTypeDate(observationStartDateNode);
                    }
                }
                else
                {
                    observationStartDate_ = new XsdTypeDate(observationStartDateNode);
                }
            }


            XmlNode observationEndDateNode = xmlNode.SelectSingleNode("observationEndDate");

            if (observationEndDateNode != null)
            {
                if (observationEndDateNode.Attributes["href"] != null || observationEndDateNode.Attributes["id"] != null)
                {
                    if (observationEndDateNode.Attributes["id"] != null)
                    {
                        observationEndDateIDRef_ = observationEndDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(observationEndDateNode);
                        IDManager.SetID(observationEndDateIDRef_, ob);
                    }
                    else if (observationEndDateNode.Attributes["href"] != null)
                    {
                        observationEndDateIDRef_ = observationEndDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationEndDate_ = new XsdTypeDate(observationEndDateNode);
                    }
                }
                else
                {
                    observationEndDate_ = new XsdTypeDate(observationEndDateNode);
                }
            }
        }
        public FxFixing(XmlNode xmlNode)
        {
            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode fixingDateNode = xmlNode.SelectSingleNode("fixingDate");

            if (fixingDateNode != null)
            {
                if (fixingDateNode.Attributes["href"] != null || fixingDateNode.Attributes["id"] != null)
                {
                    if (fixingDateNode.Attributes["id"] != null)
                    {
                        fixingDateIDRef_ = fixingDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(fixingDateNode);
                        IDManager.SetID(fixingDateIDRef_, ob);
                    }
                    else if (fixingDateNode.Attributes["href"] != null)
                    {
                        fixingDateIDRef_ = fixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDate_ = new XsdTypeDate(fixingDateNode);
                    }
                }
                else
                {
                    fixingDate_ = new XsdTypeDate(fixingDateNode);
                }
            }


            XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource");

            if (fxSpotRateSourceNode != null)
            {
                if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null)
                {
                    if (fxSpotRateSourceNode.Attributes["id"] != null)
                    {
                        fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value;
                        FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode);
                        IDManager.SetID(fxSpotRateSourceIDRef_, ob);
                    }
                    else if (fxSpotRateSourceNode.Attributes["href"] != null)
                    {
                        fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
                    }
                }
                else
                {
                    fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
                }
            }
        }
 public ExchangeRate(XmlNode xmlNode)
 {
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");
     if (rateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(rateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rate = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");
     if (spotRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spotRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spotRateIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(spotRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spotRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spotRate = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList forwardPointsNodeList = xmlNode.SelectNodes("forwardPoints");
     if (forwardPointsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forwardPointsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forwardPointsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(forwardPointsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forwardPointsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forwardPoints = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList pointValueNodeList = xmlNode.SelectNodes("pointValue");
     if (pointValueNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pointValueNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pointValueIDRef = item.Attributes["id"].Name;
                 PointValue ob = PointValue();
                 IDManager.SetID(pointValueIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pointValueIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pointValue = new PointValue(item);
             }
         }
     }
     
 
     XmlNodeList crossRateNodeList = xmlNode.SelectNodes("crossRate");
     
     foreach (XmlNode item in crossRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 crossRateIDRef = item.Attributes["id"].Name;
                 List<CrossRate> ob = new List<CrossRate>();
                 ob.Add(new CrossRate(item));
                 IDManager.SetID(crossRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 crossRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             crossRate.Add(new CrossRate(item));
             }
         }
     }
     
 
 }
 public FxFixing(XmlNode xmlNode)
 {
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList fixingDateNodeList = xmlNode.SelectNodes("fixingDate");
     if (fixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(fixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource");
     if (fxSpotRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSpotRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSpotRateSourceIDRef = item.Attributes["id"].Name;
                 FxSpotRateSource ob = FxSpotRateSource();
                 IDManager.SetID(fxSpotRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSpotRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSpotRateSource = new FxSpotRateSource(item);
             }
         }
     }
     
 
 }
 public TradeUnderlyer2(XmlNode xmlNode)
 {
     XmlNode floatingRateNode = xmlNode.SelectSingleNode("floatingRate");
     
     if (floatingRateNode != null)
     {
         if (floatingRateNode.Attributes["href"] != null || floatingRateNode.Attributes["id"] != null) 
         {
             if (floatingRateNode.Attributes["id"] != null) 
             {
                 floatingRateIDRef_ = floatingRateNode.Attributes["id"].Value;
                 FloatingRate ob = new FloatingRate(floatingRateNode);
                 IDManager.SetID(floatingRateIDRef_, ob);
             }
             else if (floatingRateNode.Attributes["href"] != null)
             {
                 floatingRateIDRef_ = floatingRateNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRate_ = new FloatingRate(floatingRateNode);
             }
         }
         else
         {
             floatingRate_ = new FloatingRate(floatingRateNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 Schedule ob = new Schedule(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new Schedule(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new Schedule(fixedRateNode);
         }
     }
     
 
     XmlNode underlyingAssetNode = xmlNode.SelectSingleNode("underlyingAsset");
     
     if (underlyingAssetNode != null)
     {
         if (underlyingAssetNode.Attributes["href"] != null || underlyingAssetNode.Attributes["id"] != null) 
         {
             if (underlyingAssetNode.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["id"].Value;
                 Asset ob = new Asset(underlyingAssetNode);
                 IDManager.SetID(underlyingAssetIDRef_, ob);
             }
             else if (underlyingAssetNode.Attributes["href"] != null)
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["href"].Value;
             }
             else
             {
                 underlyingAsset_ = new Asset(underlyingAssetNode);
             }
         }
         else
         {
             underlyingAsset_ = new Asset(underlyingAssetNode);
         }
     }
     
 
     XmlNode basketNode = xmlNode.SelectSingleNode("basket");
     
     if (basketNode != null)
     {
         if (basketNode.Attributes["href"] != null || basketNode.Attributes["id"] != null) 
         {
             if (basketNode.Attributes["id"] != null) 
             {
                 basketIDRef_ = basketNode.Attributes["id"].Value;
                 Basket ob = new Basket(basketNode);
                 IDManager.SetID(basketIDRef_, ob);
             }
             else if (basketNode.Attributes["href"] != null)
             {
                 basketIDRef_ = basketNode.Attributes["href"].Value;
             }
             else
             {
                 basket_ = new Basket(basketNode);
             }
         }
         else
         {
             basket_ = new Basket(basketNode);
         }
     }
     
 
     XmlNode bondNode = xmlNode.SelectSingleNode("bond");
     
     if (bondNode != null)
     {
         if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) 
         {
             if (bondNode.Attributes["id"] != null) 
             {
                 bondIDRef_ = bondNode.Attributes["id"].Value;
                 Bond ob = new Bond(bondNode);
                 IDManager.SetID(bondIDRef_, ob);
             }
             else if (bondNode.Attributes["href"] != null)
             {
                 bondIDRef_ = bondNode.Attributes["href"].Value;
             }
             else
             {
                 bond_ = new Bond(bondNode);
             }
         }
         else
         {
             bond_ = new Bond(bondNode);
         }
     }
     
 
     XmlNode cashNode = xmlNode.SelectSingleNode("cash");
     
     if (cashNode != null)
     {
         if (cashNode.Attributes["href"] != null || cashNode.Attributes["id"] != null) 
         {
             if (cashNode.Attributes["id"] != null) 
             {
                 cashIDRef_ = cashNode.Attributes["id"].Value;
                 Cash ob = new Cash(cashNode);
                 IDManager.SetID(cashIDRef_, ob);
             }
             else if (cashNode.Attributes["href"] != null)
             {
                 cashIDRef_ = cashNode.Attributes["href"].Value;
             }
             else
             {
                 cash_ = new Cash(cashNode);
             }
         }
         else
         {
             cash_ = new Cash(cashNode);
         }
     }
     
 
     XmlNode commodityNode = xmlNode.SelectSingleNode("commodity");
     
     if (commodityNode != null)
     {
         if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) 
         {
             if (commodityNode.Attributes["id"] != null) 
             {
                 commodityIDRef_ = commodityNode.Attributes["id"].Value;
                 Commodity ob = new Commodity(commodityNode);
                 IDManager.SetID(commodityIDRef_, ob);
             }
             else if (commodityNode.Attributes["href"] != null)
             {
                 commodityIDRef_ = commodityNode.Attributes["href"].Value;
             }
             else
             {
                 commodity_ = new Commodity(commodityNode);
             }
         }
         else
         {
             commodity_ = new Commodity(commodityNode);
         }
     }
     
 
     XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");
     
     if (convertibleBondNode != null)
     {
         if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) 
         {
             if (convertibleBondNode.Attributes["id"] != null) 
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                 ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                 IDManager.SetID(convertibleBondIDRef_, ob);
             }
             else if (convertibleBondNode.Attributes["href"] != null)
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
             }
             else
             {
                 convertibleBond_ = new ConvertibleBond(convertibleBondNode);
             }
         }
         else
         {
             convertibleBond_ = new ConvertibleBond(convertibleBondNode);
         }
     }
     
 
     XmlNode equityNode = xmlNode.SelectSingleNode("equity");
     
     if (equityNode != null)
     {
         if (equityNode.Attributes["href"] != null || equityNode.Attributes["id"] != null) 
         {
             if (equityNode.Attributes["id"] != null) 
             {
                 equityIDRef_ = equityNode.Attributes["id"].Value;
                 EquityAsset ob = new EquityAsset(equityNode);
                 IDManager.SetID(equityIDRef_, ob);
             }
             else if (equityNode.Attributes["href"] != null)
             {
                 equityIDRef_ = equityNode.Attributes["href"].Value;
             }
             else
             {
                 equity_ = new EquityAsset(equityNode);
             }
         }
         else
         {
             equity_ = new EquityAsset(equityNode);
         }
     }
     
 
     XmlNode exchangeTradedFundNode = xmlNode.SelectSingleNode("exchangeTradedFund");
     
     if (exchangeTradedFundNode != null)
     {
         if (exchangeTradedFundNode.Attributes["href"] != null || exchangeTradedFundNode.Attributes["id"] != null) 
         {
             if (exchangeTradedFundNode.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["id"].Value;
                 ExchangeTradedFund ob = new ExchangeTradedFund(exchangeTradedFundNode);
                 IDManager.SetID(exchangeTradedFundIDRef_, ob);
             }
             else if (exchangeTradedFundNode.Attributes["href"] != null)
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
             }
         }
         else
         {
             exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
         }
     }
     
 
     XmlNode futureNode = xmlNode.SelectSingleNode("future");
     
     if (futureNode != null)
     {
         if (futureNode.Attributes["href"] != null || futureNode.Attributes["id"] != null) 
         {
             if (futureNode.Attributes["id"] != null) 
             {
                 futureIDRef_ = futureNode.Attributes["id"].Value;
                 Future ob = new Future(futureNode);
                 IDManager.SetID(futureIDRef_, ob);
             }
             else if (futureNode.Attributes["href"] != null)
             {
                 futureIDRef_ = futureNode.Attributes["href"].Value;
             }
             else
             {
                 future_ = new Future(futureNode);
             }
         }
         else
         {
             future_ = new Future(futureNode);
         }
     }
     
 
     XmlNode indexNode = xmlNode.SelectSingleNode("index");
     
     if (indexNode != null)
     {
         if (indexNode.Attributes["href"] != null || indexNode.Attributes["id"] != null) 
         {
             if (indexNode.Attributes["id"] != null) 
             {
                 indexIDRef_ = indexNode.Attributes["id"].Value;
                 Index ob = new Index(indexNode);
                 IDManager.SetID(indexIDRef_, ob);
             }
             else if (indexNode.Attributes["href"] != null)
             {
                 indexIDRef_ = indexNode.Attributes["href"].Value;
             }
             else
             {
                 index_ = new Index(indexNode);
             }
         }
         else
         {
             index_ = new Index(indexNode);
         }
     }
     
 
     XmlNode loanNode = xmlNode.SelectSingleNode("loan");
     
     if (loanNode != null)
     {
         if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) 
         {
             if (loanNode.Attributes["id"] != null) 
             {
                 loanIDRef_ = loanNode.Attributes["id"].Value;
                 Loan ob = new Loan(loanNode);
                 IDManager.SetID(loanIDRef_, ob);
             }
             else if (loanNode.Attributes["href"] != null)
             {
                 loanIDRef_ = loanNode.Attributes["href"].Value;
             }
             else
             {
                 loan_ = new Loan(loanNode);
             }
         }
         else
         {
             loan_ = new Loan(loanNode);
         }
     }
     
 
     XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");
     
     if (mortgageNode != null)
     {
         if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) 
         {
             if (mortgageNode.Attributes["id"] != null) 
             {
                 mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                 Mortgage ob = new Mortgage(mortgageNode);
                 IDManager.SetID(mortgageIDRef_, ob);
             }
             else if (mortgageNode.Attributes["href"] != null)
             {
                 mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
             }
             else
             {
                 mortgage_ = new Mortgage(mortgageNode);
             }
         }
         else
         {
             mortgage_ = new Mortgage(mortgageNode);
         }
     }
     
 
     XmlNode mutualFundNode = xmlNode.SelectSingleNode("mutualFund");
     
     if (mutualFundNode != null)
     {
         if (mutualFundNode.Attributes["href"] != null || mutualFundNode.Attributes["id"] != null) 
         {
             if (mutualFundNode.Attributes["id"] != null) 
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["id"].Value;
                 MutualFund ob = new MutualFund(mutualFundNode);
                 IDManager.SetID(mutualFundIDRef_, ob);
             }
             else if (mutualFundNode.Attributes["href"] != null)
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["href"].Value;
             }
             else
             {
                 mutualFund_ = new MutualFund(mutualFundNode);
             }
         }
         else
         {
             mutualFund_ = new MutualFund(mutualFundNode);
         }
     }
     
 
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");
     
     if (referenceEntityNode != null)
     {
         if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null) 
         {
             if (referenceEntityNode.Attributes["id"] != null) 
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(referenceEntityNode);
                 IDManager.SetID(referenceEntityIDRef_, ob);
             }
             else if (referenceEntityNode.Attributes["href"] != null)
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
             }
             else
             {
                 referenceEntity_ = new LegalEntity(referenceEntityNode);
             }
         }
         else
         {
             referenceEntity_ = new LegalEntity(referenceEntityNode);
         }
     }
     
 
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
 }
        public FxFixing(XmlNode xmlNode)
        {
            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList fixingDateNodeList = xmlNode.SelectNodes("fixingDate");

            if (fixingDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(fixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource");

            if (fxSpotRateSourceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fxSpotRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxSpotRateSourceIDRef = item.Attributes["id"].Name;
                        FxSpotRateSource ob = FxSpotRateSource();
                        IDManager.SetID(fxSpotRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxSpotRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxSpotRateSource = new FxSpotRateSource(item);
                    }
                }
            }
        }
 public ExchangeRate(XmlNode xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode rateNode = xmlNode.SelectSingleNode("rate");
     
     if (rateNode != null)
     {
         if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null) 
         {
             if (rateNode.Attributes["id"] != null) 
             {
                 rateIDRef_ = rateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(rateNode);
                 IDManager.SetID(rateIDRef_, ob);
             }
             else if (rateNode.Attributes["href"] != null)
             {
                 rateIDRef_ = rateNode.Attributes["href"].Value;
             }
             else
             {
                 rate_ = new PositiveDecimal(rateNode);
             }
         }
         else
         {
             rate_ = new PositiveDecimal(rateNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new PositiveDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new PositiveDecimal(spotRateNode);
         }
     }
     
 
     XmlNode forwardPointsNode = xmlNode.SelectSingleNode("forwardPoints");
     
     if (forwardPointsNode != null)
     {
         if (forwardPointsNode.Attributes["href"] != null || forwardPointsNode.Attributes["id"] != null) 
         {
             if (forwardPointsNode.Attributes["id"] != null) 
             {
                 forwardPointsIDRef_ = forwardPointsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(forwardPointsNode);
                 IDManager.SetID(forwardPointsIDRef_, ob);
             }
             else if (forwardPointsNode.Attributes["href"] != null)
             {
                 forwardPointsIDRef_ = forwardPointsNode.Attributes["href"].Value;
             }
             else
             {
                 forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
             }
         }
         else
         {
             forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
         }
     }
     
 
     XmlNode pointValueNode = xmlNode.SelectSingleNode("pointValue");
     
     if (pointValueNode != null)
     {
         if (pointValueNode.Attributes["href"] != null || pointValueNode.Attributes["id"] != null) 
         {
             if (pointValueNode.Attributes["id"] != null) 
             {
                 pointValueIDRef_ = pointValueNode.Attributes["id"].Value;
                 PointValue ob = new PointValue(pointValueNode);
                 IDManager.SetID(pointValueIDRef_, ob);
             }
             else if (pointValueNode.Attributes["href"] != null)
             {
                 pointValueIDRef_ = pointValueNode.Attributes["href"].Value;
             }
             else
             {
                 pointValue_ = new PointValue(pointValueNode);
             }
         }
         else
         {
             pointValue_ = new PointValue(pointValueNode);
         }
     }
     
 
     XmlNodeList crossRateNodeList = xmlNode.SelectNodes("crossRate");
     
     if (crossRateNodeList != null)
     {
         this.crossRate_ = new List<CrossRate>();
         foreach (XmlNode item in crossRateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     crossRateIDRef_ = item.Attributes["id"].Value;
                     crossRate_.Add(new CrossRate(item));
                     IDManager.SetID(crossRateIDRef_, crossRate_[crossRate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     crossRateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 crossRate_.Add(new CrossRate(item));
                 }
             }
             else
             {
                 crossRate_.Add(new CrossRate(item));
             }
         }
     }
     
 
 }
 public FxTrigger(XmlNode xmlNode)
 {
     XmlNodeList triggerConditionNodeList = xmlNode.SelectNodes("triggerCondition");
     if (triggerConditionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerConditionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerConditionIDRef = item.Attributes["id"].Name;
                 TriggerConditionEnum ob = TriggerConditionEnum();
                 IDManager.SetID(triggerConditionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerConditionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 triggerCondition = new TriggerConditionEnum(item);
             }
         }
     }
     
 
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList triggerRateNodeList = xmlNode.SelectNodes("triggerRate");
     if (triggerRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerRateIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(triggerRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 triggerRate = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");
     if (spotRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spotRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spotRateIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(spotRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spotRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spotRate = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");
     
     foreach (XmlNode item in informationSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 informationSourceIDRef = item.Attributes["id"].Name;
                 List<InformationSource> ob = new List<InformationSource>();
                 ob.Add(new InformationSource(item));
                 IDManager.SetID(informationSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 informationSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
             informationSource.Add(new InformationSource(item));
             }
         }
     }
     
 
 }
 public TradeUnderlyer2(XmlNode xmlNode)
 {
     XmlNodeList floatingRateNodeList = xmlNode.SelectNodes("floatingRate");
     if (floatingRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIDRef = item.Attributes["id"].Name;
                 FloatingRate ob = FloatingRate();
                 IDManager.SetID(floatingRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRate = new FloatingRate(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");
     if (fixedRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateIDRef = item.Attributes["id"].Name;
                 Schedule ob = Schedule();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new Schedule(item);
             }
         }
     }
     
 
     XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset");
     if (underlyingAssetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyingAssetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef = item.Attributes["id"].Name;
                 Asset ob = Asset();
                 IDManager.SetID(underlyingAssetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyingAssetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyingAsset = new Asset(item);
             }
         }
     }
     
 
     XmlNodeList basketNodeList = xmlNode.SelectNodes("basket");
     if (basketNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketIDRef = item.Attributes["id"].Name;
                 Basket ob = Basket();
                 IDManager.SetID(basketIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basket = new Basket(item);
             }
         }
     }
     
 
     XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");
     if (bondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondIDRef = item.Attributes["id"].Name;
                 Bond ob = Bond();
                 IDManager.SetID(bondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bond = new Bond(item);
             }
         }
     }
     
 
     XmlNodeList cashNodeList = xmlNode.SelectNodes("cash");
     if (cashNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashIDRef = item.Attributes["id"].Name;
                 Cash ob = Cash();
                 IDManager.SetID(cashIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cash = new Cash(item);
             }
         }
     }
     
 
     XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");
     if (commodityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIDRef = item.Attributes["id"].Name;
                 Commodity ob = Commodity();
                 IDManager.SetID(commodityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodity = new Commodity(item);
             }
         }
     }
     
 
     XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");
     if (convertibleBondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in convertibleBondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 convertibleBondIDRef = item.Attributes["id"].Name;
                 ConvertibleBond ob = ConvertibleBond();
                 IDManager.SetID(convertibleBondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 convertibleBondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 convertibleBond = new ConvertibleBond(item);
             }
         }
     }
     
 
     XmlNodeList equityNodeList = xmlNode.SelectNodes("equity");
     if (equityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityIDRef = item.Attributes["id"].Name;
                 EquityAsset ob = EquityAsset();
                 IDManager.SetID(equityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equity = new EquityAsset(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund");
     if (exchangeTradedFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef = item.Attributes["id"].Name;
                 ExchangeTradedFund ob = ExchangeTradedFund();
                 IDManager.SetID(exchangeTradedFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedFund = new ExchangeTradedFund(item);
             }
         }
     }
     
 
     XmlNodeList futureNodeList = xmlNode.SelectNodes("future");
     if (futureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futureIDRef = item.Attributes["id"].Name;
                 Future ob = Future();
                 IDManager.SetID(futureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 future = new Future(item);
             }
         }
     }
     
 
     XmlNodeList indexNodeList = xmlNode.SelectNodes("index");
     if (indexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexIDRef = item.Attributes["id"].Name;
                 Index ob = Index();
                 IDManager.SetID(indexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 index = new Index(item);
             }
         }
     }
     
 
     XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");
     if (loanNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loanNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loanIDRef = item.Attributes["id"].Name;
                 Loan ob = Loan();
                 IDManager.SetID(loanIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loanIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loan = new Loan(item);
             }
         }
     }
     
 
     XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");
     if (mortgageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mortgageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mortgageIDRef = item.Attributes["id"].Name;
                 Mortgage ob = Mortgage();
                 IDManager.SetID(mortgageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mortgageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mortgage = new Mortgage(item);
             }
         }
     }
     
 
     XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund");
     if (mutualFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mutualFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mutualFundIDRef = item.Attributes["id"].Name;
                 MutualFund ob = MutualFund();
                 IDManager.SetID(mutualFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mutualFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mutualFund = new MutualFund(item);
             }
         }
     }
     
 
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity");
     if (referenceEntityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceEntityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceEntityIDRef = item.Attributes["id"].Name;
                 LegalEntity ob = LegalEntity();
                 IDManager.SetID(referenceEntityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceEntityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceEntity = new LegalEntity(item);
             }
         }
     }
     
 
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
 }
 public FxBarrierFeature(XmlNode xmlNode)
 {
     XmlNodeList barrierTypeNodeList = xmlNode.SelectNodes("barrierType");
     if (barrierTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in barrierTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 barrierTypeIDRef = item.Attributes["id"].Name;
                 FxBarrierTypeEnum ob = FxBarrierTypeEnum();
                 IDManager.SetID(barrierTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 barrierTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 barrierType = new FxBarrierTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList triggerRateNodeList = xmlNode.SelectNodes("triggerRate");
     if (triggerRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerRateIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(triggerRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 triggerRate = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");
     
     foreach (XmlNode item in informationSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 informationSourceIDRef = item.Attributes["id"].Name;
                 List<InformationSource> ob = new List<InformationSource>();
                 ob.Add(new InformationSource(item));
                 IDManager.SetID(informationSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 informationSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
             informationSource.Add(new InformationSource(item));
             }
         }
     }
     
 
     XmlNodeList observationStartDateNodeList = xmlNode.SelectNodes("observationStartDate");
     if (observationStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in observationStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 observationStartDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(observationStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 observationStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 observationStartDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList observationEndDateNodeList = xmlNode.SelectNodes("observationEndDate");
     if (observationEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in observationEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 observationEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(observationEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 observationEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 observationEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
 }
        public TradeUnderlyer2(XmlNode xmlNode)
        {
            XmlNodeList floatingRateNodeList = xmlNode.SelectNodes("floatingRate");

            if (floatingRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in floatingRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateIDRef = item.Attributes["id"].Name;
                        FloatingRate ob = FloatingRate();
                        IDManager.SetID(floatingRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRate = new FloatingRate(item);
                    }
                }
            }


            XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");

            if (fixedRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fixedRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixedRateIDRef = item.Attributes["id"].Name;
                        Schedule ob = Schedule();
                        IDManager.SetID(fixedRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixedRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixedRate = new Schedule(item);
                    }
                }
            }


            XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset");

            if (underlyingAssetNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in underlyingAssetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        underlyingAssetIDRef = item.Attributes["id"].Name;
                        Asset ob = Asset();
                        IDManager.SetID(underlyingAssetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        underlyingAssetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        underlyingAsset = new Asset(item);
                    }
                }
            }


            XmlNodeList basketNodeList = xmlNode.SelectNodes("basket");

            if (basketNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in basketNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        basketIDRef = item.Attributes["id"].Name;
                        Basket ob = Basket();
                        IDManager.SetID(basketIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        basketIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        basket = new Basket(item);
                    }
                }
            }


            XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");

            if (bondNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in bondNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        bondIDRef = item.Attributes["id"].Name;
                        Bond ob = Bond();
                        IDManager.SetID(bondIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        bondIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        bond = new Bond(item);
                    }
                }
            }


            XmlNodeList cashNodeList = xmlNode.SelectNodes("cash");

            if (cashNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in cashNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashIDRef = item.Attributes["id"].Name;
                        Cash ob = Cash();
                        IDManager.SetID(cashIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cash = new Cash(item);
                    }
                }
            }


            XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");

            if (commodityNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in commodityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commodityIDRef = item.Attributes["id"].Name;
                        Commodity ob = Commodity();
                        IDManager.SetID(commodityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commodityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commodity = new Commodity(item);
                    }
                }
            }


            XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");

            if (convertibleBondNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in convertibleBondNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        convertibleBondIDRef = item.Attributes["id"].Name;
                        ConvertibleBond ob = ConvertibleBond();
                        IDManager.SetID(convertibleBondIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        convertibleBondIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        convertibleBond = new ConvertibleBond(item);
                    }
                }
            }


            XmlNodeList equityNodeList = xmlNode.SelectNodes("equity");

            if (equityNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in equityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityIDRef = item.Attributes["id"].Name;
                        EquityAsset ob = EquityAsset();
                        IDManager.SetID(equityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equity = new EquityAsset(item);
                    }
                }
            }


            XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund");

            if (exchangeTradedFundNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in exchangeTradedFundNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeTradedFundIDRef = item.Attributes["id"].Name;
                        ExchangeTradedFund ob = ExchangeTradedFund();
                        IDManager.SetID(exchangeTradedFundIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeTradedFundIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeTradedFund = new ExchangeTradedFund(item);
                    }
                }
            }


            XmlNodeList futureNodeList = xmlNode.SelectNodes("future");

            if (futureNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in futureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        futureIDRef = item.Attributes["id"].Name;
                        Future ob = Future();
                        IDManager.SetID(futureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        futureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        future = new Future(item);
                    }
                }
            }


            XmlNodeList indexNodeList = xmlNode.SelectNodes("index");

            if (indexNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in indexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexIDRef = item.Attributes["id"].Name;
                        Index ob = Index();
                        IDManager.SetID(indexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        index = new Index(item);
                    }
                }
            }


            XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");

            if (loanNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in loanNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        loanIDRef = item.Attributes["id"].Name;
                        Loan ob = Loan();
                        IDManager.SetID(loanIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        loanIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        loan = new Loan(item);
                    }
                }
            }


            XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");

            if (mortgageNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in mortgageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mortgageIDRef = item.Attributes["id"].Name;
                        Mortgage ob = Mortgage();
                        IDManager.SetID(mortgageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mortgageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mortgage = new Mortgage(item);
                    }
                }
            }


            XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund");

            if (mutualFundNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in mutualFundNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mutualFundIDRef = item.Attributes["id"].Name;
                        MutualFund ob = MutualFund();
                        IDManager.SetID(mutualFundIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mutualFundIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mutualFund = new MutualFund(item);
                    }
                }
            }


            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity");

            if (referenceEntityNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in referenceEntityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referenceEntityIDRef = item.Attributes["id"].Name;
                        LegalEntity ob = LegalEntity();
                        IDManager.SetID(referenceEntityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referenceEntityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referenceEntity = new LegalEntity(item);
                    }
                }
            }


            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

            if (payerPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in payerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(payerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

            if (payerAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in payerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(payerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

            if (receiverPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in receiverPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(receiverPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

            if (receiverAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in receiverAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(receiverAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverAccountReference = new AccountReference(item);
                    }
                }
            }
        }
        public ExchangeRate(XmlNode xmlNode)
        {
            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode rateNode = xmlNode.SelectSingleNode("rate");

            if (rateNode != null)
            {
                if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null)
                {
                    if (rateNode.Attributes["id"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(rateNode);
                        IDManager.SetID(rateIDRef_, ob);
                    }
                    else if (rateNode.Attributes["href"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rate_ = new PositiveDecimal(rateNode);
                    }
                }
                else
                {
                    rate_ = new PositiveDecimal(rateNode);
                }
            }


            XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");

            if (spotRateNode != null)
            {
                if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null)
                {
                    if (spotRateNode.Attributes["id"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                        IDManager.SetID(spotRateIDRef_, ob);
                    }
                    else if (spotRateNode.Attributes["href"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotRate_ = new PositiveDecimal(spotRateNode);
                    }
                }
                else
                {
                    spotRate_ = new PositiveDecimal(spotRateNode);
                }
            }


            XmlNode forwardPointsNode = xmlNode.SelectSingleNode("forwardPoints");

            if (forwardPointsNode != null)
            {
                if (forwardPointsNode.Attributes["href"] != null || forwardPointsNode.Attributes["id"] != null)
                {
                    if (forwardPointsNode.Attributes["id"] != null)
                    {
                        forwardPointsIDRef_ = forwardPointsNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(forwardPointsNode);
                        IDManager.SetID(forwardPointsIDRef_, ob);
                    }
                    else if (forwardPointsNode.Attributes["href"] != null)
                    {
                        forwardPointsIDRef_ = forwardPointsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
                    }
                }
                else
                {
                    forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
                }
            }


            XmlNode pointValueNode = xmlNode.SelectSingleNode("pointValue");

            if (pointValueNode != null)
            {
                if (pointValueNode.Attributes["href"] != null || pointValueNode.Attributes["id"] != null)
                {
                    if (pointValueNode.Attributes["id"] != null)
                    {
                        pointValueIDRef_ = pointValueNode.Attributes["id"].Value;
                        PointValue ob = new PointValue(pointValueNode);
                        IDManager.SetID(pointValueIDRef_, ob);
                    }
                    else if (pointValueNode.Attributes["href"] != null)
                    {
                        pointValueIDRef_ = pointValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pointValue_ = new PointValue(pointValueNode);
                    }
                }
                else
                {
                    pointValue_ = new PointValue(pointValueNode);
                }
            }


            XmlNodeList crossRateNodeList = xmlNode.SelectNodes("crossRate");

            if (crossRateNodeList != null)
            {
                this.crossRate_ = new List <CrossRate>();
                foreach (XmlNode item in crossRateNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            crossRateIDRef_ = item.Attributes["id"].Value;
                            crossRate_.Add(new CrossRate(item));
                            IDManager.SetID(crossRateIDRef_, crossRate_[crossRate_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            crossRateIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            crossRate_.Add(new CrossRate(item));
                        }
                    }
                    else
                    {
                        crossRate_.Add(new CrossRate(item));
                    }
                }
            }
        }
 public FxFixing(XmlNode xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode fixingDateNode = xmlNode.SelectSingleNode("fixingDate");
     
     if (fixingDateNode != null)
     {
         if (fixingDateNode.Attributes["href"] != null || fixingDateNode.Attributes["id"] != null) 
         {
             if (fixingDateNode.Attributes["id"] != null) 
             {
                 fixingDateIDRef_ = fixingDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(fixingDateNode);
                 IDManager.SetID(fixingDateIDRef_, ob);
             }
             else if (fixingDateNode.Attributes["href"] != null)
             {
                 fixingDateIDRef_ = fixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDate_ = new XsdTypeDate(fixingDateNode);
             }
         }
         else
         {
             fixingDate_ = new XsdTypeDate(fixingDateNode);
         }
     }
     
 
     XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource");
     
     if (fxSpotRateSourceNode != null)
     {
         if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null) 
         {
             if (fxSpotRateSourceNode.Attributes["id"] != null) 
             {
                 fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value;
                 FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode);
                 IDManager.SetID(fxSpotRateSourceIDRef_, ob);
             }
             else if (fxSpotRateSourceNode.Attributes["href"] != null)
             {
                 fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
             }
         }
         else
         {
             fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
         }
     }
     
 
 }
 public FxTrigger(XmlNode xmlNode)
 {
     XmlNode triggerConditionNode = xmlNode.SelectSingleNode("triggerCondition");
     
     if (triggerConditionNode != null)
     {
         if (triggerConditionNode.Attributes["href"] != null || triggerConditionNode.Attributes["id"] != null) 
         {
             if (triggerConditionNode.Attributes["id"] != null) 
             {
                 triggerConditionIDRef_ = triggerConditionNode.Attributes["id"].Value;
                 TriggerConditionEnum ob = new TriggerConditionEnum(triggerConditionNode);
                 IDManager.SetID(triggerConditionIDRef_, ob);
             }
             else if (triggerConditionNode.Attributes["href"] != null)
             {
                 triggerConditionIDRef_ = triggerConditionNode.Attributes["href"].Value;
             }
             else
             {
                 triggerCondition_ = new TriggerConditionEnum(triggerConditionNode);
             }
         }
         else
         {
             triggerCondition_ = new TriggerConditionEnum(triggerConditionNode);
         }
     }
     
 
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");
     
     if (triggerRateNode != null)
     {
         if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null) 
         {
             if (triggerRateNode.Attributes["id"] != null) 
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                 IDManager.SetID(triggerRateIDRef_, ob);
             }
             else if (triggerRateNode.Attributes["href"] != null)
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
             }
             else
             {
                 triggerRate_ = new PositiveDecimal(triggerRateNode);
             }
         }
         else
         {
             triggerRate_ = new PositiveDecimal(triggerRateNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new PositiveDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new PositiveDecimal(spotRateNode);
         }
     }
     
 
     XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");
     
     if (informationSourceNodeList != null)
     {
         this.informationSource_ = new List<InformationSource>();
         foreach (XmlNode item in informationSourceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     informationSourceIDRef_ = item.Attributes["id"].Value;
                     informationSource_.Add(new InformationSource(item));
                     IDManager.SetID(informationSourceIDRef_, informationSource_[informationSource_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     informationSourceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 informationSource_.Add(new InformationSource(item));
                 }
             }
             else
             {
                 informationSource_.Add(new InformationSource(item));
             }
         }
     }
     
 
 }
        public FxTrigger(XmlNode xmlNode)
        {
            XmlNodeList triggerConditionNodeList = xmlNode.SelectNodes("triggerCondition");

            if (triggerConditionNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in triggerConditionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerConditionIDRef = item.Attributes["id"].Name;
                        TriggerConditionEnum ob = TriggerConditionEnum();
                        IDManager.SetID(triggerConditionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerConditionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerCondition = new TriggerConditionEnum(item);
                    }
                }
            }


            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

            if (quotedCurrencyPairNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList triggerRateNodeList = xmlNode.SelectNodes("triggerRate");

            if (triggerRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in triggerRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(triggerRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");

            if (spotRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in spotRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(spotRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");

            foreach (XmlNode item in informationSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        informationSourceIDRef = item.Attributes["id"].Name;
                        List <InformationSource> ob = new List <InformationSource>();
                        ob.Add(new InformationSource(item));
                        IDManager.SetID(informationSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        informationSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        informationSource.Add(new InformationSource(item));
                    }
                }
            }
        }