public Withdrawal(XmlNode xmlNode)
 {
     XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");
     
     if (partyTradeIdentifierNodeList != null)
     {
         this.partyTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in partyTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     partyTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     partyTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(partyTradeIdentifierIDRef_, partyTradeIdentifier_[partyTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     partyTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 partyTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 partyTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new XsdTypeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new XsdTypeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode requestedActionNode = xmlNode.SelectSingleNode("requestedAction");
     
     if (requestedActionNode != null)
     {
         if (requestedActionNode.Attributes["href"] != null || requestedActionNode.Attributes["id"] != null) 
         {
             if (requestedActionNode.Attributes["id"] != null) 
             {
                 requestedActionIDRef_ = requestedActionNode.Attributes["id"].Value;
                 RequestedWithdrawalAction ob = new RequestedWithdrawalAction(requestedActionNode);
                 IDManager.SetID(requestedActionIDRef_, ob);
             }
             else if (requestedActionNode.Attributes["href"] != null)
             {
                 requestedActionIDRef_ = requestedActionNode.Attributes["href"].Value;
             }
             else
             {
                 requestedAction_ = new RequestedWithdrawalAction(requestedActionNode);
             }
         }
         else
         {
             requestedAction_ = new RequestedWithdrawalAction(requestedActionNode);
         }
     }
     
 
     XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");
     
     if (reasonNodeList != null)
     {
         this.reason_ = new List<WithdrawalReason>();
         foreach (XmlNode item in reasonNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     reasonIDRef_ = item.Attributes["id"].Value;
                     reason_.Add(new WithdrawalReason(item));
                     IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     reasonIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 reason_.Add(new WithdrawalReason(item));
                 }
             }
             else
             {
                 reason_.Add(new WithdrawalReason(item));
             }
         }
     }
     
 
 }
 public Withdrawal(XmlNode xmlNode)
 {
     XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");
     
     foreach (XmlNode item in partyTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(partyTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             partyTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList requestedActionNodeList = xmlNode.SelectNodes("requestedAction");
     if (requestedActionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in requestedActionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 requestedActionIDRef = item.Attributes["id"].Name;
                 RequestedWithdrawalAction ob = RequestedWithdrawalAction();
                 IDManager.SetID(requestedActionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 requestedActionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 requestedAction = new RequestedWithdrawalAction(item);
             }
         }
     }
     
 
     XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");
     
     foreach (XmlNode item in reasonNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 reasonIDRef = item.Attributes["id"].Name;
                 List<WithdrawalReason> ob = new List<WithdrawalReason>();
                 ob.Add(new WithdrawalReason(item));
                 IDManager.SetID(reasonIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 reasonIDRef = item.Attributes["href"].Name;
             }
             else
             {
             reason.Add(new WithdrawalReason(item));
             }
         }
     }
     
 
 }
        public Withdrawal(XmlNode xmlNode)
        {
            XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");

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


            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

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


            XmlNode requestedActionNode = xmlNode.SelectSingleNode("requestedAction");

            if (requestedActionNode != null)
            {
                if (requestedActionNode.Attributes["href"] != null || requestedActionNode.Attributes["id"] != null)
                {
                    if (requestedActionNode.Attributes["id"] != null)
                    {
                        requestedActionIDRef_ = requestedActionNode.Attributes["id"].Value;
                        RequestedWithdrawalAction ob = new RequestedWithdrawalAction(requestedActionNode);
                        IDManager.SetID(requestedActionIDRef_, ob);
                    }
                    else if (requestedActionNode.Attributes["href"] != null)
                    {
                        requestedActionIDRef_ = requestedActionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        requestedAction_ = new RequestedWithdrawalAction(requestedActionNode);
                    }
                }
                else
                {
                    requestedAction_ = new RequestedWithdrawalAction(requestedActionNode);
                }
            }


            XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");

            if (reasonNodeList != null)
            {
                this.reason_ = new List <WithdrawalReason>();
                foreach (XmlNode item in reasonNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            reasonIDRef_ = item.Attributes["id"].Value;
                            reason_.Add(new WithdrawalReason(item));
                            IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            reasonIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            reason_.Add(new WithdrawalReason(item));
                        }
                    }
                    else
                    {
                        reason_.Add(new WithdrawalReason(item));
                    }
                }
            }
        }
        public Withdrawal(XmlNode xmlNode)
        {
            XmlNodeList partyTradeIdentifierNodeList = xmlNode.SelectNodes("partyTradeIdentifier");

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


            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

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


            XmlNodeList requestedActionNodeList = xmlNode.SelectNodes("requestedAction");

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

            foreach (XmlNode item in requestedActionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        requestedActionIDRef = item.Attributes["id"].Name;
                        RequestedWithdrawalAction ob = RequestedWithdrawalAction();
                        IDManager.SetID(requestedActionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        requestedActionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        requestedAction = new RequestedWithdrawalAction(item);
                    }
                }
            }


            XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");

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