Beispiel #1
0
        public FxStrikePrice(XmlNode xmlNode)
        {
            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 strikeQuoteBasisNodeList = xmlNode.SelectNodes("strikeQuoteBasis");

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

            foreach (XmlNode item in strikeQuoteBasisNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeQuoteBasisIDRef = item.Attributes["id"].Name;
                        StrikeQuoteBasisEnum ob = StrikeQuoteBasisEnum();
                        IDManager.SetID(strikeQuoteBasisIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeQuoteBasisIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strikeQuoteBasis = new StrikeQuoteBasisEnum(item);
                    }
                }
            }
        }
 public FxStrikePrice(XmlNode xmlNode)
 {
     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 strikeQuoteBasisNode = xmlNode.SelectSingleNode("strikeQuoteBasis");
     
     if (strikeQuoteBasisNode != null)
     {
         if (strikeQuoteBasisNode.Attributes["href"] != null || strikeQuoteBasisNode.Attributes["id"] != null) 
         {
             if (strikeQuoteBasisNode.Attributes["id"] != null) 
             {
                 strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["id"].Value;
                 StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(strikeQuoteBasisNode);
                 IDManager.SetID(strikeQuoteBasisIDRef_, ob);
             }
             else if (strikeQuoteBasisNode.Attributes["href"] != null)
             {
                 strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["href"].Value;
             }
             else
             {
                 strikeQuoteBasis_ = new StrikeQuoteBasisEnum(strikeQuoteBasisNode);
             }
         }
         else
         {
             strikeQuoteBasis_ = new StrikeQuoteBasisEnum(strikeQuoteBasisNode);
         }
     }
     
 
 }
        public FxStrikePrice(XmlNode xmlNode)
        {
            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 strikeQuoteBasisNode = xmlNode.SelectSingleNode("strikeQuoteBasis");

            if (strikeQuoteBasisNode != null)
            {
                if (strikeQuoteBasisNode.Attributes["href"] != null || strikeQuoteBasisNode.Attributes["id"] != null)
                {
                    if (strikeQuoteBasisNode.Attributes["id"] != null)
                    {
                        strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["id"].Value;
                        StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(strikeQuoteBasisNode);
                        IDManager.SetID(strikeQuoteBasisIDRef_, ob);
                    }
                    else if (strikeQuoteBasisNode.Attributes["href"] != null)
                    {
                        strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strikeQuoteBasis_ = new StrikeQuoteBasisEnum(strikeQuoteBasisNode);
                    }
                }
                else
                {
                    strikeQuoteBasis_ = new StrikeQuoteBasisEnum(strikeQuoteBasisNode);
                }
            }
        }
Beispiel #4
0
        public FxAsianFeature(XmlNode xmlNode)
        {
            XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");

            if (primaryRateSourceNode != null)
            {
                if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null)
                {
                    if (primaryRateSourceNode.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(primaryRateSourceNode);
                        IDManager.SetID(primaryRateSourceIDRef_, ob);
                    }
                    else if (primaryRateSourceNode.Attributes["href"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                    }
                }
                else
                {
                    primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                }
            }


            XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");

            if (secondaryRateSourceNode != null)
            {
                if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null)
                {
                    if (secondaryRateSourceNode.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(secondaryRateSourceNode);
                        IDManager.SetID(secondaryRateSourceIDRef_, ob);
                    }
                    else if (secondaryRateSourceNode.Attributes["href"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                    }
                }
                else
                {
                    secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                }
            }


            XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");

            if (fixingTimeNode != null)
            {
                if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null)
                {
                    if (fixingTimeNode.Attributes["id"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                        IDManager.SetID(fixingTimeIDRef_, ob);
                    }
                    else if (fixingTimeNode.Attributes["href"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                    }
                }
                else
                {
                    fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                }
            }


            XmlNode observationScheduleNode = xmlNode.SelectSingleNode("observationSchedule");

            if (observationScheduleNode != null)
            {
                if (observationScheduleNode.Attributes["href"] != null || observationScheduleNode.Attributes["id"] != null)
                {
                    if (observationScheduleNode.Attributes["id"] != null)
                    {
                        observationScheduleIDRef_ = observationScheduleNode.Attributes["id"].Value;
                        FxAverageRateObservationSchedule ob = new FxAverageRateObservationSchedule(observationScheduleNode);
                        IDManager.SetID(observationScheduleIDRef_, ob);
                    }
                    else if (observationScheduleNode.Attributes["href"] != null)
                    {
                        observationScheduleIDRef_ = observationScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
                    }
                }
                else
                {
                    observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
                }
            }


            XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");

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


            XmlNode rateObservationQuoteBasisNode = xmlNode.SelectSingleNode("rateObservationQuoteBasis");

            if (rateObservationQuoteBasisNode != null)
            {
                if (rateObservationQuoteBasisNode.Attributes["href"] != null || rateObservationQuoteBasisNode.Attributes["id"] != null)
                {
                    if (rateObservationQuoteBasisNode.Attributes["id"] != null)
                    {
                        rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["id"].Value;
                        StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                        IDManager.SetID(rateObservationQuoteBasisIDRef_, ob);
                    }
                    else if (rateObservationQuoteBasisNode.Attributes["href"] != null)
                    {
                        rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                    }
                }
                else
                {
                    rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                }
            }


            XmlNode payoutFormulaNode = xmlNode.SelectSingleNode("payoutFormula");

            if (payoutFormulaNode != null)
            {
                if (payoutFormulaNode.Attributes["href"] != null || payoutFormulaNode.Attributes["id"] != null)
                {
                    if (payoutFormulaNode.Attributes["id"] != null)
                    {
                        payoutFormulaIDRef_ = payoutFormulaNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(payoutFormulaNode);
                        IDManager.SetID(payoutFormulaIDRef_, ob);
                    }
                    else if (payoutFormulaNode.Attributes["href"] != null)
                    {
                        payoutFormulaIDRef_ = payoutFormulaNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payoutFormula_ = new XsdTypeString(payoutFormulaNode);
                    }
                }
                else
                {
                    payoutFormula_ = new XsdTypeString(payoutFormulaNode);
                }
            }


            XmlNode precisionNode = xmlNode.SelectSingleNode("precision");

            if (precisionNode != null)
            {
                if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null)
                {
                    if (precisionNode.Attributes["id"] != null)
                    {
                        precisionIDRef_ = precisionNode.Attributes["id"].Value;
                        XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode);
                        IDManager.SetID(precisionIDRef_, ob);
                    }
                    else if (precisionNode.Attributes["href"] != null)
                    {
                        precisionIDRef_ = precisionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        precision_ = new XsdTypeNonNegativeInteger(precisionNode);
                    }
                }
                else
                {
                    precision_ = new XsdTypeNonNegativeInteger(precisionNode);
                }
            }
        }
 public FxAsianFeature(XmlNode xmlNode)
 {
     XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");
     
     if (primaryRateSourceNode != null)
     {
         if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) 
         {
             if (primaryRateSourceNode.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(primaryRateSourceNode);
                 IDManager.SetID(primaryRateSourceIDRef_, ob);
             }
             else if (primaryRateSourceNode.Attributes["href"] != null)
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 primaryRateSource_ = new InformationSource(primaryRateSourceNode);
             }
         }
         else
         {
             primaryRateSource_ = new InformationSource(primaryRateSourceNode);
         }
     }
     
 
     XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");
     
     if (secondaryRateSourceNode != null)
     {
         if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) 
         {
             if (secondaryRateSourceNode.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(secondaryRateSourceNode);
                 IDManager.SetID(secondaryRateSourceIDRef_, ob);
             }
             else if (secondaryRateSourceNode.Attributes["href"] != null)
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
             }
         }
         else
         {
             secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
         }
     }
     
 
     XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");
     
     if (fixingTimeNode != null)
     {
         if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) 
         {
             if (fixingTimeNode.Attributes["id"] != null) 
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                 IDManager.SetID(fixingTimeIDRef_, ob);
             }
             else if (fixingTimeNode.Attributes["href"] != null)
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
             }
             else
             {
                 fixingTime_ = new BusinessCenterTime(fixingTimeNode);
             }
         }
         else
         {
             fixingTime_ = new BusinessCenterTime(fixingTimeNode);
         }
     }
     
 
     XmlNode observationScheduleNode = xmlNode.SelectSingleNode("observationSchedule");
     
     if (observationScheduleNode != null)
     {
         if (observationScheduleNode.Attributes["href"] != null || observationScheduleNode.Attributes["id"] != null) 
         {
             if (observationScheduleNode.Attributes["id"] != null) 
             {
                 observationScheduleIDRef_ = observationScheduleNode.Attributes["id"].Value;
                 FxAverageRateObservationSchedule ob = new FxAverageRateObservationSchedule(observationScheduleNode);
                 IDManager.SetID(observationScheduleIDRef_, ob);
             }
             else if (observationScheduleNode.Attributes["href"] != null)
             {
                 observationScheduleIDRef_ = observationScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
             }
         }
         else
         {
             observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
         }
     }
     
 
     XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");
     
     if (rateObservationNodeList != null)
     {
         this.rateObservation_ = new List<FxAverageRateObservation>();
         foreach (XmlNode item in rateObservationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     rateObservationIDRef_ = item.Attributes["id"].Value;
                     rateObservation_.Add(new FxAverageRateObservation(item));
                     IDManager.SetID(rateObservationIDRef_, rateObservation_[rateObservation_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     rateObservationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 rateObservation_.Add(new FxAverageRateObservation(item));
                 }
             }
             else
             {
                 rateObservation_.Add(new FxAverageRateObservation(item));
             }
         }
     }
     
 
     XmlNode rateObservationQuoteBasisNode = xmlNode.SelectSingleNode("rateObservationQuoteBasis");
     
     if (rateObservationQuoteBasisNode != null)
     {
         if (rateObservationQuoteBasisNode.Attributes["href"] != null || rateObservationQuoteBasisNode.Attributes["id"] != null) 
         {
             if (rateObservationQuoteBasisNode.Attributes["id"] != null) 
             {
                 rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["id"].Value;
                 StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                 IDManager.SetID(rateObservationQuoteBasisIDRef_, ob);
             }
             else if (rateObservationQuoteBasisNode.Attributes["href"] != null)
             {
                 rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["href"].Value;
             }
             else
             {
                 rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
             }
         }
         else
         {
             rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
         }
     }
     
 
     XmlNode payoutFormulaNode = xmlNode.SelectSingleNode("payoutFormula");
     
     if (payoutFormulaNode != null)
     {
         if (payoutFormulaNode.Attributes["href"] != null || payoutFormulaNode.Attributes["id"] != null) 
         {
             if (payoutFormulaNode.Attributes["id"] != null) 
             {
                 payoutFormulaIDRef_ = payoutFormulaNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(payoutFormulaNode);
                 IDManager.SetID(payoutFormulaIDRef_, ob);
             }
             else if (payoutFormulaNode.Attributes["href"] != null)
             {
                 payoutFormulaIDRef_ = payoutFormulaNode.Attributes["href"].Value;
             }
             else
             {
                 payoutFormula_ = new XsdTypeString(payoutFormulaNode);
             }
         }
         else
         {
             payoutFormula_ = new XsdTypeString(payoutFormulaNode);
         }
     }
     
 
     XmlNode precisionNode = xmlNode.SelectSingleNode("precision");
     
     if (precisionNode != null)
     {
         if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null) 
         {
             if (precisionNode.Attributes["id"] != null) 
             {
                 precisionIDRef_ = precisionNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode);
                 IDManager.SetID(precisionIDRef_, ob);
             }
             else if (precisionNode.Attributes["href"] != null)
             {
                 precisionIDRef_ = precisionNode.Attributes["href"].Value;
             }
             else
             {
                 precision_ = new XsdTypeNonNegativeInteger(precisionNode);
             }
         }
         else
         {
             precision_ = new XsdTypeNonNegativeInteger(precisionNode);
         }
     }
     
 
 }
        public FxAsianFeature(XmlNode xmlNode)
        {
            XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");

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

            foreach (XmlNode item in primaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(primaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        primaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        primaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");

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

            foreach (XmlNode item in secondaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(secondaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        secondaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secondaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList observationScheduleNodeList = xmlNode.SelectNodes("observationSchedule");

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

            foreach (XmlNode item in observationScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        observationScheduleIDRef = item.Attributes["id"].Name;
                        FxAverageRateObservationSchedule ob = FxAverageRateObservationSchedule();
                        IDManager.SetID(observationScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        observationScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        observationSchedule = new FxAverageRateObservationSchedule(item);
                    }
                }
            }


            XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");

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


            XmlNodeList rateObservationQuoteBasisNodeList = xmlNode.SelectNodes("rateObservationQuoteBasis");

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

            foreach (XmlNode item in rateObservationQuoteBasisNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateObservationQuoteBasisIDRef = item.Attributes["id"].Name;
                        StrikeQuoteBasisEnum ob = StrikeQuoteBasisEnum();
                        IDManager.SetID(rateObservationQuoteBasisIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateObservationQuoteBasisIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateObservationQuoteBasis = new StrikeQuoteBasisEnum(item);
                    }
                }
            }


            XmlNodeList payoutFormulaNodeList = xmlNode.SelectNodes("payoutFormula");

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

            foreach (XmlNode item in payoutFormulaNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payoutFormulaIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(payoutFormulaIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payoutFormulaIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payoutFormula = new XsdTypeString(item);
                    }
                }
            }


            XmlNodeList precisionNodeList = xmlNode.SelectNodes("precision");

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

            foreach (XmlNode item in precisionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        precisionIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(precisionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        precisionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        precision = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }
        }