Ejemplo n.º 1
0
        public CommodityHub(XmlNode xmlNode)
        {
            XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");

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


            XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");

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


            XmlNode hubCodeNode = xmlNode.SelectSingleNode("hubCode");

            if (hubCodeNode != null)
            {
                if (hubCodeNode.Attributes["href"] != null || hubCodeNode.Attributes["id"] != null)
                {
                    if (hubCodeNode.Attributes["id"] != null)
                    {
                        hubCodeIDRef_ = hubCodeNode.Attributes["id"].Value;
                        CommodityHubCode ob = new CommodityHubCode(hubCodeNode);
                        IDManager.SetID(hubCodeIDRef_, ob);
                    }
                    else if (hubCodeNode.Attributes["href"] != null)
                    {
                        hubCodeIDRef_ = hubCodeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        hubCode_ = new CommodityHubCode(hubCodeNode);
                    }
                }
                else
                {
                    hubCode_ = new CommodityHubCode(hubCodeNode);
                }
            }
        }
 public CommodityHub(XmlNode xmlNode)
 {
     XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");
     
     if (partyReferenceNode != null)
     {
         if (partyReferenceNode.Attributes["href"] != null || partyReferenceNode.Attributes["id"] != null) 
         {
             if (partyReferenceNode.Attributes["id"] != null) 
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(partyReferenceNode);
                 IDManager.SetID(partyReferenceIDRef_, ob);
             }
             else if (partyReferenceNode.Attributes["href"] != null)
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partyReference_ = new PartyReference(partyReferenceNode);
             }
         }
         else
         {
             partyReference_ = new PartyReference(partyReferenceNode);
         }
     }
     
 
     XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");
     
     if (accountReferenceNode != null)
     {
         if (accountReferenceNode.Attributes["href"] != null || accountReferenceNode.Attributes["id"] != null) 
         {
             if (accountReferenceNode.Attributes["id"] != null) 
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(accountReferenceNode);
                 IDManager.SetID(accountReferenceIDRef_, ob);
             }
             else if (accountReferenceNode.Attributes["href"] != null)
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 accountReference_ = new AccountReference(accountReferenceNode);
             }
         }
         else
         {
             accountReference_ = new AccountReference(accountReferenceNode);
         }
     }
     
 
     XmlNode hubCodeNode = xmlNode.SelectSingleNode("hubCode");
     
     if (hubCodeNode != null)
     {
         if (hubCodeNode.Attributes["href"] != null || hubCodeNode.Attributes["id"] != null) 
         {
             if (hubCodeNode.Attributes["id"] != null) 
             {
                 hubCodeIDRef_ = hubCodeNode.Attributes["id"].Value;
                 CommodityHubCode ob = new CommodityHubCode(hubCodeNode);
                 IDManager.SetID(hubCodeIDRef_, ob);
             }
             else if (hubCodeNode.Attributes["href"] != null)
             {
                 hubCodeIDRef_ = hubCodeNode.Attributes["href"].Value;
             }
             else
             {
                 hubCode_ = new CommodityHubCode(hubCodeNode);
             }
         }
         else
         {
             hubCode_ = new CommodityHubCode(hubCodeNode);
         }
     }
     
 
 }
 public CommodityHub(XmlNode xmlNode)
 {
     XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");
     if (partyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(partyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");
     if (accountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(accountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList hubCodeNodeList = xmlNode.SelectNodes("hubCode");
     if (hubCodeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in hubCodeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 hubCodeIDRef = item.Attributes["id"].Name;
                 CommodityHubCode ob = CommodityHubCode();
                 IDManager.SetID(hubCodeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 hubCodeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 hubCode = new CommodityHubCode(item);
             }
         }
     }
     
 
 }
Ejemplo n.º 4
0
        public CommodityHub(XmlNode xmlNode)
        {
            XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");

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

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


            XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");

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

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


            XmlNodeList hubCodeNodeList = xmlNode.SelectNodes("hubCode");

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

            foreach (XmlNode item in hubCodeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        hubCodeIDRef = item.Attributes["id"].Name;
                        CommodityHubCode ob = CommodityHubCode();
                        IDManager.SetID(hubCodeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        hubCodeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        hubCode = new CommodityHubCode(item);
                    }
                }
            }
        }