示例#1
0
        public AdditionalData(XmlNode xmlNode)
        {
            XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType");

            if (mimeTypeNode != null)
            {
                if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null)
                {
                    if (mimeTypeNode.Attributes["id"] != null)
                    {
                        mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value;
                        MimeType ob = new MimeType(mimeTypeNode);
                        IDManager.SetID(mimeTypeIDRef_, ob);
                    }
                    else if (mimeTypeNode.Attributes["href"] != null)
                    {
                        mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mimeType_ = new MimeType(mimeTypeNode);
                    }
                }
                else
                {
                    mimeType_ = new MimeType(mimeTypeNode);
                }
            }


            XmlNode stringNode = xmlNode.SelectSingleNode("string");

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


            XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary");

            if (hexadecimalBinaryNode != null)
            {
                if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null)
                {
                    if (hexadecimalBinaryNode.Attributes["id"] != null)
                    {
                        hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value;
                        XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode);
                        IDManager.SetID(hexadecimalBinaryIDRef_, ob);
                    }
                    else if (hexadecimalBinaryNode.Attributes["href"] != null)
                    {
                        hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
                    }
                }
                else
                {
                    hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
                }
            }


            XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary");

            if (base64BinaryNode != null)
            {
                if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null)
                {
                    if (base64BinaryNode.Attributes["id"] != null)
                    {
                        base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value;
                        XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode);
                        IDManager.SetID(base64BinaryIDRef_, ob);
                    }
                    else if (base64BinaryNode.Attributes["href"] != null)
                    {
                        base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
                    }
                }
                else
                {
                    base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
                }
            }


            XmlNode originalMessageNode = xmlNode.SelectSingleNode("originalMessage");

            if (originalMessageNode != null)
            {
                if (originalMessageNode.Attributes["href"] != null || originalMessageNode.Attributes["id"] != null)
                {
                    if (originalMessageNode.Attributes["id"] != null)
                    {
                        originalMessageIDRef_ = originalMessageNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(originalMessageNode);
                        IDManager.SetID(originalMessageIDRef_, ob);
                    }
                    else if (originalMessageNode.Attributes["href"] != null)
                    {
                        originalMessageIDRef_ = originalMessageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        originalMessage_ = new XsdTypeBoolean(originalMessageNode);
                    }
                }
                else
                {
                    originalMessage_ = new XsdTypeBoolean(originalMessageNode);
                }
            }
        }
        public ExternalDocument(XmlNode xmlNode)
        {
            XmlNodeList mimeTypeNodeList = xmlNode.SelectNodes("mimeType");

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

            foreach (XmlNode item in mimeTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mimeTypeIDRef = item.Attributes["id"].Name;
                        MimeType ob = MimeType();
                        IDManager.SetID(mimeTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mimeTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mimeType = new MimeType(item);
                    }
                }
            }


            XmlNodeList stringNodeList = xmlNode.SelectNodes("string");

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

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


            XmlNodeList hexadecimalBinaryNodeList = xmlNode.SelectNodes("hexadecimalBinary");

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

            foreach (XmlNode item in hexadecimalBinaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        hexadecimalBinaryIDRef = item.Attributes["id"].Name;
                        XsdTypeHexBinary ob = XsdTypeHexBinary();
                        IDManager.SetID(hexadecimalBinaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        hexadecimalBinaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        hexadecimalBinary = new XsdTypeHexBinary(item);
                    }
                }
            }


            XmlNodeList base64BinaryNodeList = xmlNode.SelectNodes("base64Binary");

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

            foreach (XmlNode item in base64BinaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        base64BinaryIDRef = item.Attributes["id"].Name;
                        XsdTypeBase64Binary ob = XsdTypeBase64Binary();
                        IDManager.SetID(base64BinaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        base64BinaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        base64Binary = new XsdTypeBase64Binary(item);
                    }
                }
            }


            XmlNodeList urlNodeList = xmlNode.SelectNodes("url");

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

            foreach (XmlNode item in urlNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        urlIDRef = item.Attributes["id"].Name;
                        XsdTypeAnyURI ob = XsdTypeAnyURI();
                        IDManager.SetID(urlIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        urlIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        url = new XsdTypeAnyURI(item);
                    }
                }
            }


            XmlNodeList attachmentReferenceNodeList = xmlNode.SelectNodes("attachmentReference");

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

            foreach (XmlNode item in attachmentReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        attachmentReferenceIDRef = item.Attributes["id"].Name;
                        HTTPAttachmentReference ob = HTTPAttachmentReference();
                        IDManager.SetID(attachmentReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        attachmentReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        attachmentReference = new HTTPAttachmentReference(item);
                    }
                }
            }
        }
        public AdditionalData(XmlNode xmlNode)
        {
            XmlNodeList mimeTypeNodeList = xmlNode.SelectNodes("mimeType");

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

            foreach (XmlNode item in mimeTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mimeTypeIDRef = item.Attributes["id"].Name;
                        MimeType ob = MimeType();
                        IDManager.SetID(mimeTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mimeTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mimeType = new MimeType(item);
                    }
                }
            }


            XmlNodeList stringNodeList = xmlNode.SelectNodes("string");

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

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


            XmlNodeList hexadecimalBinaryNodeList = xmlNode.SelectNodes("hexadecimalBinary");

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

            foreach (XmlNode item in hexadecimalBinaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        hexadecimalBinaryIDRef = item.Attributes["id"].Name;
                        XsdTypeHexBinary ob = XsdTypeHexBinary();
                        IDManager.SetID(hexadecimalBinaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        hexadecimalBinaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        hexadecimalBinary = new XsdTypeHexBinary(item);
                    }
                }
            }


            XmlNodeList base64BinaryNodeList = xmlNode.SelectNodes("base64Binary");

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

            foreach (XmlNode item in base64BinaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        base64BinaryIDRef = item.Attributes["id"].Name;
                        XsdTypeBase64Binary ob = XsdTypeBase64Binary();
                        IDManager.SetID(base64BinaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        base64BinaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        base64Binary = new XsdTypeBase64Binary(item);
                    }
                }
            }


            XmlNodeList originalMessageNodeList = xmlNode.SelectNodes("originalMessage");

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

            foreach (XmlNode item in originalMessageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        originalMessageIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(originalMessageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        originalMessageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        originalMessage = new XsdTypeBoolean(item);
                    }
                }
            }
        }
        public ExternalDocument(XmlNode xmlNode)
        {
            XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType");

            if (mimeTypeNode != null)
            {
                if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null)
                {
                    if (mimeTypeNode.Attributes["id"] != null)
                    {
                        mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value;
                        MimeType ob = new MimeType(mimeTypeNode);
                        IDManager.SetID(mimeTypeIDRef_, ob);
                    }
                    else if (mimeTypeNode.Attributes["href"] != null)
                    {
                        mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mimeType_ = new MimeType(mimeTypeNode);
                    }
                }
                else
                {
                    mimeType_ = new MimeType(mimeTypeNode);
                }
            }


            XmlNode stringNode = xmlNode.SelectSingleNode("string");

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


            XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary");

            if (hexadecimalBinaryNode != null)
            {
                if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null)
                {
                    if (hexadecimalBinaryNode.Attributes["id"] != null)
                    {
                        hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value;
                        XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode);
                        IDManager.SetID(hexadecimalBinaryIDRef_, ob);
                    }
                    else if (hexadecimalBinaryNode.Attributes["href"] != null)
                    {
                        hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
                    }
                }
                else
                {
                    hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
                }
            }


            XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary");

            if (base64BinaryNode != null)
            {
                if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null)
                {
                    if (base64BinaryNode.Attributes["id"] != null)
                    {
                        base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value;
                        XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode);
                        IDManager.SetID(base64BinaryIDRef_, ob);
                    }
                    else if (base64BinaryNode.Attributes["href"] != null)
                    {
                        base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
                    }
                }
                else
                {
                    base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
                }
            }


            XmlNode urlNode = xmlNode.SelectSingleNode("url");

            if (urlNode != null)
            {
                if (urlNode.Attributes["href"] != null || urlNode.Attributes["id"] != null)
                {
                    if (urlNode.Attributes["id"] != null)
                    {
                        urlIDRef_ = urlNode.Attributes["id"].Value;
                        XsdTypeAnyURI ob = new XsdTypeAnyURI(urlNode);
                        IDManager.SetID(urlIDRef_, ob);
                    }
                    else if (urlNode.Attributes["href"] != null)
                    {
                        urlIDRef_ = urlNode.Attributes["href"].Value;
                    }
                    else
                    {
                        url_ = new XsdTypeAnyURI(urlNode);
                    }
                }
                else
                {
                    url_ = new XsdTypeAnyURI(urlNode);
                }
            }


            XmlNode attachmentReferenceNode = xmlNode.SelectSingleNode("attachmentReference");

            if (attachmentReferenceNode != null)
            {
                if (attachmentReferenceNode.Attributes["href"] != null || attachmentReferenceNode.Attributes["id"] != null)
                {
                    if (attachmentReferenceNode.Attributes["id"] != null)
                    {
                        attachmentReferenceIDRef_ = attachmentReferenceNode.Attributes["id"].Value;
                        HTTPAttachmentReference ob = new HTTPAttachmentReference(attachmentReferenceNode);
                        IDManager.SetID(attachmentReferenceIDRef_, ob);
                    }
                    else if (attachmentReferenceNode.Attributes["href"] != null)
                    {
                        attachmentReferenceIDRef_ = attachmentReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        attachmentReference_ = new HTTPAttachmentReference(attachmentReferenceNode);
                    }
                }
                else
                {
                    attachmentReference_ = new HTTPAttachmentReference(attachmentReferenceNode);
                }
            }
        }
 public AdditionalData(XmlNode xmlNode)
 {
     XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType");
     
     if (mimeTypeNode != null)
     {
         if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null) 
         {
             if (mimeTypeNode.Attributes["id"] != null) 
             {
                 mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value;
                 MimeType ob = new MimeType(mimeTypeNode);
                 IDManager.SetID(mimeTypeIDRef_, ob);
             }
             else if (mimeTypeNode.Attributes["href"] != null)
             {
                 mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 mimeType_ = new MimeType(mimeTypeNode);
             }
         }
         else
         {
             mimeType_ = new MimeType(mimeTypeNode);
         }
     }
     
 
     XmlNode stringNode = xmlNode.SelectSingleNode("string");
     
     if (stringNode != null)
     {
         if (stringNode.Attributes["href"] != null || stringNode.Attributes["id"] != null) 
         {
             if (stringNode.Attributes["id"] != null) 
             {
                 stringIDRef_ = stringNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(stringNode);
                 IDManager.SetID(stringIDRef_, ob);
             }
             else if (stringNode.Attributes["href"] != null)
             {
                 stringIDRef_ = stringNode.Attributes["href"].Value;
             }
             else
             {
                 string_ = new XsdTypeString(stringNode);
             }
         }
         else
         {
             string_ = new XsdTypeString(stringNode);
         }
     }
     
 
     XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary");
     
     if (hexadecimalBinaryNode != null)
     {
         if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null) 
         {
             if (hexadecimalBinaryNode.Attributes["id"] != null) 
             {
                 hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value;
                 XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode);
                 IDManager.SetID(hexadecimalBinaryIDRef_, ob);
             }
             else if (hexadecimalBinaryNode.Attributes["href"] != null)
             {
                 hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value;
             }
             else
             {
                 hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
             }
         }
         else
         {
             hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
         }
     }
     
 
     XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary");
     
     if (base64BinaryNode != null)
     {
         if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null) 
         {
             if (base64BinaryNode.Attributes["id"] != null) 
             {
                 base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value;
                 XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode);
                 IDManager.SetID(base64BinaryIDRef_, ob);
             }
             else if (base64BinaryNode.Attributes["href"] != null)
             {
                 base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value;
             }
             else
             {
                 base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
             }
         }
         else
         {
             base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
         }
     }
     
 
     XmlNode originalMessageNode = xmlNode.SelectSingleNode("originalMessage");
     
     if (originalMessageNode != null)
     {
         if (originalMessageNode.Attributes["href"] != null || originalMessageNode.Attributes["id"] != null) 
         {
             if (originalMessageNode.Attributes["id"] != null) 
             {
                 originalMessageIDRef_ = originalMessageNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(originalMessageNode);
                 IDManager.SetID(originalMessageIDRef_, ob);
             }
             else if (originalMessageNode.Attributes["href"] != null)
             {
                 originalMessageIDRef_ = originalMessageNode.Attributes["href"].Value;
             }
             else
             {
                 originalMessage_ = new XsdTypeBoolean(originalMessageNode);
             }
         }
         else
         {
             originalMessage_ = new XsdTypeBoolean(originalMessageNode);
         }
     }
     
 
 }
        public LegAmount(XmlNode xmlNode)
        {
            XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");

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

            foreach (XmlNode item in currencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyIDRef = item.Attributes["id"].Name;
                        IdentifiedCurrency ob = IdentifiedCurrency();
                        IDManager.SetID(currencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency = new IdentifiedCurrency(item);
                    }
                }
            }


            XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod");

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

            foreach (XmlNode item in determinationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        determinationMethodIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(determinationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        determinationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        determinationMethod = new DeterminationMethod(item);
                    }
                }
            }


            XmlNodeList currencyReferenceNodeList = xmlNode.SelectNodes("currencyReference");

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

            foreach (XmlNode item in currencyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyReferenceIDRef = item.Attributes["id"].Name;
                        IdentifiedCurrencyReference ob = IdentifiedCurrencyReference();
                        IDManager.SetID(currencyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currencyReference = new IdentifiedCurrencyReference(item);
                    }
                }
            }


            XmlNodeList referenceAmountNodeList = xmlNode.SelectNodes("referenceAmount");

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

            foreach (XmlNode item in referenceAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referenceAmountIDRef = item.Attributes["id"].Name;
                        ReferenceAmount ob = ReferenceAmount();
                        IDManager.SetID(referenceAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referenceAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referenceAmount = new ReferenceAmount(item);
                    }
                }
            }


            XmlNodeList formulaNodeList = xmlNode.SelectNodes("formula");

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

            foreach (XmlNode item in formulaNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        formulaIDRef = item.Attributes["id"].Name;
                        Formula ob = Formula();
                        IDManager.SetID(formulaIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        formulaIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        formula = new Formula(item);
                    }
                }
            }


            XmlNodeList encodedDescriptionNodeList = xmlNode.SelectNodes("encodedDescription");

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

            foreach (XmlNode item in encodedDescriptionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        encodedDescriptionIDRef = item.Attributes["id"].Name;
                        XsdTypeBase64Binary ob = XsdTypeBase64Binary();
                        IDManager.SetID(encodedDescriptionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        encodedDescriptionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        encodedDescription = new XsdTypeBase64Binary(item);
                    }
                }
            }


            XmlNodeList calculationDatesNodeList = xmlNode.SelectNodes("calculationDates");

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

            foreach (XmlNode item in calculationDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationDatesIDRef = item.Attributes["id"].Name;
                        AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates();
                        IDManager.SetID(calculationDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationDates = new AdjustableRelativeOrPeriodicDates(item);
                    }
                }
            }
        }
 public ExternalDocument(XmlNode xmlNode)
 {
     XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType");
     
     if (mimeTypeNode != null)
     {
         if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null) 
         {
             if (mimeTypeNode.Attributes["id"] != null) 
             {
                 mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value;
                 MimeType ob = new MimeType(mimeTypeNode);
                 IDManager.SetID(mimeTypeIDRef_, ob);
             }
             else if (mimeTypeNode.Attributes["href"] != null)
             {
                 mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 mimeType_ = new MimeType(mimeTypeNode);
             }
         }
         else
         {
             mimeType_ = new MimeType(mimeTypeNode);
         }
     }
     
 
     XmlNode stringNode = xmlNode.SelectSingleNode("string");
     
     if (stringNode != null)
     {
         if (stringNode.Attributes["href"] != null || stringNode.Attributes["id"] != null) 
         {
             if (stringNode.Attributes["id"] != null) 
             {
                 stringIDRef_ = stringNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(stringNode);
                 IDManager.SetID(stringIDRef_, ob);
             }
             else if (stringNode.Attributes["href"] != null)
             {
                 stringIDRef_ = stringNode.Attributes["href"].Value;
             }
             else
             {
                 string_ = new XsdTypeString(stringNode);
             }
         }
         else
         {
             string_ = new XsdTypeString(stringNode);
         }
     }
     
 
     XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary");
     
     if (hexadecimalBinaryNode != null)
     {
         if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null) 
         {
             if (hexadecimalBinaryNode.Attributes["id"] != null) 
             {
                 hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value;
                 XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode);
                 IDManager.SetID(hexadecimalBinaryIDRef_, ob);
             }
             else if (hexadecimalBinaryNode.Attributes["href"] != null)
             {
                 hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value;
             }
             else
             {
                 hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
             }
         }
         else
         {
             hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
         }
     }
     
 
     XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary");
     
     if (base64BinaryNode != null)
     {
         if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null) 
         {
             if (base64BinaryNode.Attributes["id"] != null) 
             {
                 base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value;
                 XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode);
                 IDManager.SetID(base64BinaryIDRef_, ob);
             }
             else if (base64BinaryNode.Attributes["href"] != null)
             {
                 base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value;
             }
             else
             {
                 base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
             }
         }
         else
         {
             base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
         }
     }
     
 
     XmlNode urlNode = xmlNode.SelectSingleNode("url");
     
     if (urlNode != null)
     {
         if (urlNode.Attributes["href"] != null || urlNode.Attributes["id"] != null) 
         {
             if (urlNode.Attributes["id"] != null) 
             {
                 urlIDRef_ = urlNode.Attributes["id"].Value;
                 XsdTypeAnyURI ob = new XsdTypeAnyURI(urlNode);
                 IDManager.SetID(urlIDRef_, ob);
             }
             else if (urlNode.Attributes["href"] != null)
             {
                 urlIDRef_ = urlNode.Attributes["href"].Value;
             }
             else
             {
                 url_ = new XsdTypeAnyURI(urlNode);
             }
         }
         else
         {
             url_ = new XsdTypeAnyURI(urlNode);
         }
     }
     
 
     XmlNode attachmentReferenceNode = xmlNode.SelectSingleNode("attachmentReference");
     
     if (attachmentReferenceNode != null)
     {
         if (attachmentReferenceNode.Attributes["href"] != null || attachmentReferenceNode.Attributes["id"] != null) 
         {
             if (attachmentReferenceNode.Attributes["id"] != null) 
             {
                 attachmentReferenceIDRef_ = attachmentReferenceNode.Attributes["id"].Value;
                 HTTPAttachmentReference ob = new HTTPAttachmentReference(attachmentReferenceNode);
                 IDManager.SetID(attachmentReferenceIDRef_, ob);
             }
             else if (attachmentReferenceNode.Attributes["href"] != null)
             {
                 attachmentReferenceIDRef_ = attachmentReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 attachmentReference_ = new HTTPAttachmentReference(attachmentReferenceNode);
             }
         }
         else
         {
             attachmentReference_ = new HTTPAttachmentReference(attachmentReferenceNode);
         }
     }
     
 
 }
示例#8
0
        public Resource(XmlNode xmlNode)
        {
            XmlNode resourceIdNode = xmlNode.SelectSingleNode("resourceId");

            if (resourceIdNode != null)
            {
                if (resourceIdNode.Attributes["href"] != null || resourceIdNode.Attributes["id"] != null)
                {
                    if (resourceIdNode.Attributes["id"] != null)
                    {
                        resourceIdIDRef_ = resourceIdNode.Attributes["id"].Value;
                        ResourceId ob = new ResourceId(resourceIdNode);
                        IDManager.SetID(resourceIdIDRef_, ob);
                    }
                    else if (resourceIdNode.Attributes["href"] != null)
                    {
                        resourceIdIDRef_ = resourceIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resourceId_ = new ResourceId(resourceIdNode);
                    }
                }
                else
                {
                    resourceId_ = new ResourceId(resourceIdNode);
                }
            }


            XmlNode resourceTypeNode = xmlNode.SelectSingleNode("resourceType");

            if (resourceTypeNode != null)
            {
                if (resourceTypeNode.Attributes["href"] != null || resourceTypeNode.Attributes["id"] != null)
                {
                    if (resourceTypeNode.Attributes["id"] != null)
                    {
                        resourceTypeIDRef_ = resourceTypeNode.Attributes["id"].Value;
                        ResourceType ob = new ResourceType(resourceTypeNode);
                        IDManager.SetID(resourceTypeIDRef_, ob);
                    }
                    else if (resourceTypeNode.Attributes["href"] != null)
                    {
                        resourceTypeIDRef_ = resourceTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resourceType_ = new ResourceType(resourceTypeNode);
                    }
                }
                else
                {
                    resourceType_ = new ResourceType(resourceTypeNode);
                }
            }


            XmlNode languageNode = xmlNode.SelectSingleNode("language");

            if (languageNode != null)
            {
                if (languageNode.Attributes["href"] != null || languageNode.Attributes["id"] != null)
                {
                    if (languageNode.Attributes["id"] != null)
                    {
                        languageIDRef_ = languageNode.Attributes["id"].Value;
                        Language ob = new Language(languageNode);
                        IDManager.SetID(languageIDRef_, ob);
                    }
                    else if (languageNode.Attributes["href"] != null)
                    {
                        languageIDRef_ = languageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        language_ = new Language(languageNode);
                    }
                }
                else
                {
                    language_ = new Language(languageNode);
                }
            }


            XmlNode sizeInBytesNode = xmlNode.SelectSingleNode("sizeInBytes");

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


            XmlNode lengthNode = xmlNode.SelectSingleNode("length");

            if (lengthNode != null)
            {
                if (lengthNode.Attributes["href"] != null || lengthNode.Attributes["id"] != null)
                {
                    if (lengthNode.Attributes["id"] != null)
                    {
                        lengthIDRef_ = lengthNode.Attributes["id"].Value;
                        ResourceLength ob = new ResourceLength(lengthNode);
                        IDManager.SetID(lengthIDRef_, ob);
                    }
                    else if (lengthNode.Attributes["href"] != null)
                    {
                        lengthIDRef_ = lengthNode.Attributes["href"].Value;
                    }
                    else
                    {
                        length_ = new ResourceLength(lengthNode);
                    }
                }
                else
                {
                    length_ = new ResourceLength(lengthNode);
                }
            }


            XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType");

            if (mimeTypeNode != null)
            {
                if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null)
                {
                    if (mimeTypeNode.Attributes["id"] != null)
                    {
                        mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value;
                        MimeType ob = new MimeType(mimeTypeNode);
                        IDManager.SetID(mimeTypeIDRef_, ob);
                    }
                    else if (mimeTypeNode.Attributes["href"] != null)
                    {
                        mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mimeType_ = new MimeType(mimeTypeNode);
                    }
                }
                else
                {
                    mimeType_ = new MimeType(mimeTypeNode);
                }
            }


            XmlNode nameNode = xmlNode.SelectSingleNode("name");

            if (nameNode != null)
            {
                if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null)
                {
                    if (nameNode.Attributes["id"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(nameNode);
                        IDManager.SetID(nameIDRef_, ob);
                    }
                    else if (nameNode.Attributes["href"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        name_ = new XsdTypeNormalizedString(nameNode);
                    }
                }
                else
                {
                    name_ = new XsdTypeNormalizedString(nameNode);
                }
            }


            XmlNode commentsNode = xmlNode.SelectSingleNode("comments");

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


            XmlNode stringNode = xmlNode.SelectSingleNode("string");

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


            XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary");

            if (hexadecimalBinaryNode != null)
            {
                if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null)
                {
                    if (hexadecimalBinaryNode.Attributes["id"] != null)
                    {
                        hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value;
                        XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode);
                        IDManager.SetID(hexadecimalBinaryIDRef_, ob);
                    }
                    else if (hexadecimalBinaryNode.Attributes["href"] != null)
                    {
                        hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
                    }
                }
                else
                {
                    hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
                }
            }


            XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary");

            if (base64BinaryNode != null)
            {
                if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null)
                {
                    if (base64BinaryNode.Attributes["id"] != null)
                    {
                        base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value;
                        XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode);
                        IDManager.SetID(base64BinaryIDRef_, ob);
                    }
                    else if (base64BinaryNode.Attributes["href"] != null)
                    {
                        base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
                    }
                }
                else
                {
                    base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
                }
            }


            XmlNode urlNode = xmlNode.SelectSingleNode("url");

            if (urlNode != null)
            {
                if (urlNode.Attributes["href"] != null || urlNode.Attributes["id"] != null)
                {
                    if (urlNode.Attributes["id"] != null)
                    {
                        urlIDRef_ = urlNode.Attributes["id"].Value;
                        XsdTypeAnyURI ob = new XsdTypeAnyURI(urlNode);
                        IDManager.SetID(urlIDRef_, ob);
                    }
                    else if (urlNode.Attributes["href"] != null)
                    {
                        urlIDRef_ = urlNode.Attributes["href"].Value;
                    }
                    else
                    {
                        url_ = new XsdTypeAnyURI(urlNode);
                    }
                }
                else
                {
                    url_ = new XsdTypeAnyURI(urlNode);
                }
            }
        }
 public Resource(XmlNode xmlNode)
 {
     XmlNode resourceIdNode = xmlNode.SelectSingleNode("resourceId");
     
     if (resourceIdNode != null)
     {
         if (resourceIdNode.Attributes["href"] != null || resourceIdNode.Attributes["id"] != null) 
         {
             if (resourceIdNode.Attributes["id"] != null) 
             {
                 resourceIdIDRef_ = resourceIdNode.Attributes["id"].Value;
                 ResourceId ob = new ResourceId(resourceIdNode);
                 IDManager.SetID(resourceIdIDRef_, ob);
             }
             else if (resourceIdNode.Attributes["href"] != null)
             {
                 resourceIdIDRef_ = resourceIdNode.Attributes["href"].Value;
             }
             else
             {
                 resourceId_ = new ResourceId(resourceIdNode);
             }
         }
         else
         {
             resourceId_ = new ResourceId(resourceIdNode);
         }
     }
     
 
     XmlNode resourceTypeNode = xmlNode.SelectSingleNode("resourceType");
     
     if (resourceTypeNode != null)
     {
         if (resourceTypeNode.Attributes["href"] != null || resourceTypeNode.Attributes["id"] != null) 
         {
             if (resourceTypeNode.Attributes["id"] != null) 
             {
                 resourceTypeIDRef_ = resourceTypeNode.Attributes["id"].Value;
                 ResourceType ob = new ResourceType(resourceTypeNode);
                 IDManager.SetID(resourceTypeIDRef_, ob);
             }
             else if (resourceTypeNode.Attributes["href"] != null)
             {
                 resourceTypeIDRef_ = resourceTypeNode.Attributes["href"].Value;
             }
             else
             {
                 resourceType_ = new ResourceType(resourceTypeNode);
             }
         }
         else
         {
             resourceType_ = new ResourceType(resourceTypeNode);
         }
     }
     
 
     XmlNode languageNode = xmlNode.SelectSingleNode("language");
     
     if (languageNode != null)
     {
         if (languageNode.Attributes["href"] != null || languageNode.Attributes["id"] != null) 
         {
             if (languageNode.Attributes["id"] != null) 
             {
                 languageIDRef_ = languageNode.Attributes["id"].Value;
                 Language ob = new Language(languageNode);
                 IDManager.SetID(languageIDRef_, ob);
             }
             else if (languageNode.Attributes["href"] != null)
             {
                 languageIDRef_ = languageNode.Attributes["href"].Value;
             }
             else
             {
                 language_ = new Language(languageNode);
             }
         }
         else
         {
             language_ = new Language(languageNode);
         }
     }
     
 
     XmlNode sizeInBytesNode = xmlNode.SelectSingleNode("sizeInBytes");
     
     if (sizeInBytesNode != null)
     {
         if (sizeInBytesNode.Attributes["href"] != null || sizeInBytesNode.Attributes["id"] != null) 
         {
             if (sizeInBytesNode.Attributes["id"] != null) 
             {
                 sizeInBytesIDRef_ = sizeInBytesNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(sizeInBytesNode);
                 IDManager.SetID(sizeInBytesIDRef_, ob);
             }
             else if (sizeInBytesNode.Attributes["href"] != null)
             {
                 sizeInBytesIDRef_ = sizeInBytesNode.Attributes["href"].Value;
             }
             else
             {
                 sizeInBytes_ = new XsdTypeDecimal(sizeInBytesNode);
             }
         }
         else
         {
             sizeInBytes_ = new XsdTypeDecimal(sizeInBytesNode);
         }
     }
     
 
     XmlNode lengthNode = xmlNode.SelectSingleNode("length");
     
     if (lengthNode != null)
     {
         if (lengthNode.Attributes["href"] != null || lengthNode.Attributes["id"] != null) 
         {
             if (lengthNode.Attributes["id"] != null) 
             {
                 lengthIDRef_ = lengthNode.Attributes["id"].Value;
                 ResourceLength ob = new ResourceLength(lengthNode);
                 IDManager.SetID(lengthIDRef_, ob);
             }
             else if (lengthNode.Attributes["href"] != null)
             {
                 lengthIDRef_ = lengthNode.Attributes["href"].Value;
             }
             else
             {
                 length_ = new ResourceLength(lengthNode);
             }
         }
         else
         {
             length_ = new ResourceLength(lengthNode);
         }
     }
     
 
     XmlNode mimeTypeNode = xmlNode.SelectSingleNode("mimeType");
     
     if (mimeTypeNode != null)
     {
         if (mimeTypeNode.Attributes["href"] != null || mimeTypeNode.Attributes["id"] != null) 
         {
             if (mimeTypeNode.Attributes["id"] != null) 
             {
                 mimeTypeIDRef_ = mimeTypeNode.Attributes["id"].Value;
                 MimeType ob = new MimeType(mimeTypeNode);
                 IDManager.SetID(mimeTypeIDRef_, ob);
             }
             else if (mimeTypeNode.Attributes["href"] != null)
             {
                 mimeTypeIDRef_ = mimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 mimeType_ = new MimeType(mimeTypeNode);
             }
         }
         else
         {
             mimeType_ = new MimeType(mimeTypeNode);
         }
     }
     
 
     XmlNode nameNode = xmlNode.SelectSingleNode("name");
     
     if (nameNode != null)
     {
         if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) 
         {
             if (nameNode.Attributes["id"] != null) 
             {
                 nameIDRef_ = nameNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(nameNode);
                 IDManager.SetID(nameIDRef_, ob);
             }
             else if (nameNode.Attributes["href"] != null)
             {
                 nameIDRef_ = nameNode.Attributes["href"].Value;
             }
             else
             {
                 name_ = new XsdTypeNormalizedString(nameNode);
             }
         }
         else
         {
             name_ = new XsdTypeNormalizedString(nameNode);
         }
     }
     
 
     XmlNode commentsNode = xmlNode.SelectSingleNode("comments");
     
     if (commentsNode != null)
     {
         if (commentsNode.Attributes["href"] != null || commentsNode.Attributes["id"] != null) 
         {
             if (commentsNode.Attributes["id"] != null) 
             {
                 commentsIDRef_ = commentsNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(commentsNode);
                 IDManager.SetID(commentsIDRef_, ob);
             }
             else if (commentsNode.Attributes["href"] != null)
             {
                 commentsIDRef_ = commentsNode.Attributes["href"].Value;
             }
             else
             {
                 comments_ = new XsdTypeString(commentsNode);
             }
         }
         else
         {
             comments_ = new XsdTypeString(commentsNode);
         }
     }
     
 
     XmlNode stringNode = xmlNode.SelectSingleNode("string");
     
     if (stringNode != null)
     {
         if (stringNode.Attributes["href"] != null || stringNode.Attributes["id"] != null) 
         {
             if (stringNode.Attributes["id"] != null) 
             {
                 stringIDRef_ = stringNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(stringNode);
                 IDManager.SetID(stringIDRef_, ob);
             }
             else if (stringNode.Attributes["href"] != null)
             {
                 stringIDRef_ = stringNode.Attributes["href"].Value;
             }
             else
             {
                 string_ = new XsdTypeString(stringNode);
             }
         }
         else
         {
             string_ = new XsdTypeString(stringNode);
         }
     }
     
 
     XmlNode hexadecimalBinaryNode = xmlNode.SelectSingleNode("hexadecimalBinary");
     
     if (hexadecimalBinaryNode != null)
     {
         if (hexadecimalBinaryNode.Attributes["href"] != null || hexadecimalBinaryNode.Attributes["id"] != null) 
         {
             if (hexadecimalBinaryNode.Attributes["id"] != null) 
             {
                 hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["id"].Value;
                 XsdTypeHexBinary ob = new XsdTypeHexBinary(hexadecimalBinaryNode);
                 IDManager.SetID(hexadecimalBinaryIDRef_, ob);
             }
             else if (hexadecimalBinaryNode.Attributes["href"] != null)
             {
                 hexadecimalBinaryIDRef_ = hexadecimalBinaryNode.Attributes["href"].Value;
             }
             else
             {
                 hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
             }
         }
         else
         {
             hexadecimalBinary_ = new XsdTypeHexBinary(hexadecimalBinaryNode);
         }
     }
     
 
     XmlNode base64BinaryNode = xmlNode.SelectSingleNode("base64Binary");
     
     if (base64BinaryNode != null)
     {
         if (base64BinaryNode.Attributes["href"] != null || base64BinaryNode.Attributes["id"] != null) 
         {
             if (base64BinaryNode.Attributes["id"] != null) 
             {
                 base64BinaryIDRef_ = base64BinaryNode.Attributes["id"].Value;
                 XsdTypeBase64Binary ob = new XsdTypeBase64Binary(base64BinaryNode);
                 IDManager.SetID(base64BinaryIDRef_, ob);
             }
             else if (base64BinaryNode.Attributes["href"] != null)
             {
                 base64BinaryIDRef_ = base64BinaryNode.Attributes["href"].Value;
             }
             else
             {
                 base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
             }
         }
         else
         {
             base64Binary_ = new XsdTypeBase64Binary(base64BinaryNode);
         }
     }
     
 
     XmlNode urlNode = xmlNode.SelectSingleNode("url");
     
     if (urlNode != null)
     {
         if (urlNode.Attributes["href"] != null || urlNode.Attributes["id"] != null) 
         {
             if (urlNode.Attributes["id"] != null) 
             {
                 urlIDRef_ = urlNode.Attributes["id"].Value;
                 XsdTypeAnyURI ob = new XsdTypeAnyURI(urlNode);
                 IDManager.SetID(urlIDRef_, ob);
             }
             else if (urlNode.Attributes["href"] != null)
             {
                 urlIDRef_ = urlNode.Attributes["href"].Value;
             }
             else
             {
                 url_ = new XsdTypeAnyURI(urlNode);
             }
         }
         else
         {
             url_ = new XsdTypeAnyURI(urlNode);
         }
     }
     
 
 }
        public Resource(XmlNode xmlNode)
        {
            XmlNodeList resourceIdNodeList = xmlNode.SelectNodes("resourceId");

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

            foreach (XmlNode item in resourceIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resourceIdIDRef = item.Attributes["id"].Name;
                        ResourceId ob = ResourceId();
                        IDManager.SetID(resourceIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resourceIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resourceId = new ResourceId(item);
                    }
                }
            }


            XmlNodeList resourceTypeNodeList = xmlNode.SelectNodes("resourceType");

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

            foreach (XmlNode item in resourceTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resourceTypeIDRef = item.Attributes["id"].Name;
                        ResourceType ob = ResourceType();
                        IDManager.SetID(resourceTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resourceTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resourceType = new ResourceType(item);
                    }
                }
            }


            XmlNodeList languageNodeList = xmlNode.SelectNodes("language");

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

            foreach (XmlNode item in languageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        languageIDRef = item.Attributes["id"].Name;
                        Language ob = Language();
                        IDManager.SetID(languageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        languageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        language = new Language(item);
                    }
                }
            }


            XmlNodeList sizeInBytesNodeList = xmlNode.SelectNodes("sizeInBytes");

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

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


            XmlNodeList lengthNodeList = xmlNode.SelectNodes("length");

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

            foreach (XmlNode item in lengthNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lengthIDRef = item.Attributes["id"].Name;
                        ResourceLength ob = ResourceLength();
                        IDManager.SetID(lengthIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lengthIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        length = new ResourceLength(item);
                    }
                }
            }


            XmlNodeList mimeTypeNodeList = xmlNode.SelectNodes("mimeType");

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

            foreach (XmlNode item in mimeTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mimeTypeIDRef = item.Attributes["id"].Name;
                        MimeType ob = MimeType();
                        IDManager.SetID(mimeTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mimeTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mimeType = new MimeType(item);
                    }
                }
            }


            XmlNodeList nameNodeList = xmlNode.SelectNodes("name");

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

            foreach (XmlNode item in nameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(nameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        name = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList commentsNodeList = xmlNode.SelectNodes("comments");

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

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


            XmlNodeList stringNodeList = xmlNode.SelectNodes("string");

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

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


            XmlNodeList hexadecimalBinaryNodeList = xmlNode.SelectNodes("hexadecimalBinary");

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

            foreach (XmlNode item in hexadecimalBinaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        hexadecimalBinaryIDRef = item.Attributes["id"].Name;
                        XsdTypeHexBinary ob = XsdTypeHexBinary();
                        IDManager.SetID(hexadecimalBinaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        hexadecimalBinaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        hexadecimalBinary = new XsdTypeHexBinary(item);
                    }
                }
            }


            XmlNodeList base64BinaryNodeList = xmlNode.SelectNodes("base64Binary");

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

            foreach (XmlNode item in base64BinaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        base64BinaryIDRef = item.Attributes["id"].Name;
                        XsdTypeBase64Binary ob = XsdTypeBase64Binary();
                        IDManager.SetID(base64BinaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        base64BinaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        base64Binary = new XsdTypeBase64Binary(item);
                    }
                }
            }


            XmlNodeList urlNodeList = xmlNode.SelectNodes("url");

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

            foreach (XmlNode item in urlNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        urlIDRef = item.Attributes["id"].Name;
                        XsdTypeAnyURI ob = XsdTypeAnyURI();
                        IDManager.SetID(urlIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        urlIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        url = new XsdTypeAnyURI(item);
                    }
                }
            }
        }
 public LegAmount(XmlNode xmlNode)
 {
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 IdentifiedCurrency ob = new IdentifiedCurrency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new IdentifiedCurrency(currencyNode);
             }
         }
         else
         {
             currency_ = new IdentifiedCurrency(currencyNode);
         }
     }
     
 
     XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");
     
     if (determinationMethodNode != null)
     {
         if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null) 
         {
             if (determinationMethodNode.Attributes["id"] != null) 
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                 IDManager.SetID(determinationMethodIDRef_, ob);
             }
             else if (determinationMethodNode.Attributes["href"] != null)
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 determinationMethod_ = new DeterminationMethod(determinationMethodNode);
             }
         }
         else
         {
             determinationMethod_ = new DeterminationMethod(determinationMethodNode);
         }
     }
     
 
     XmlNode currencyReferenceNode = xmlNode.SelectSingleNode("currencyReference");
     
     if (currencyReferenceNode != null)
     {
         if (currencyReferenceNode.Attributes["href"] != null || currencyReferenceNode.Attributes["id"] != null) 
         {
             if (currencyReferenceNode.Attributes["id"] != null) 
             {
                 currencyReferenceIDRef_ = currencyReferenceNode.Attributes["id"].Value;
                 IdentifiedCurrencyReference ob = new IdentifiedCurrencyReference(currencyReferenceNode);
                 IDManager.SetID(currencyReferenceIDRef_, ob);
             }
             else if (currencyReferenceNode.Attributes["href"] != null)
             {
                 currencyReferenceIDRef_ = currencyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
             }
         }
         else
         {
             currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
         }
     }
     
 
     XmlNode referenceAmountNode = xmlNode.SelectSingleNode("referenceAmount");
     
     if (referenceAmountNode != null)
     {
         if (referenceAmountNode.Attributes["href"] != null || referenceAmountNode.Attributes["id"] != null) 
         {
             if (referenceAmountNode.Attributes["id"] != null) 
             {
                 referenceAmountIDRef_ = referenceAmountNode.Attributes["id"].Value;
                 ReferenceAmount ob = new ReferenceAmount(referenceAmountNode);
                 IDManager.SetID(referenceAmountIDRef_, ob);
             }
             else if (referenceAmountNode.Attributes["href"] != null)
             {
                 referenceAmountIDRef_ = referenceAmountNode.Attributes["href"].Value;
             }
             else
             {
                 referenceAmount_ = new ReferenceAmount(referenceAmountNode);
             }
         }
         else
         {
             referenceAmount_ = new ReferenceAmount(referenceAmountNode);
         }
     }
     
 
     XmlNode formulaNode = xmlNode.SelectSingleNode("formula");
     
     if (formulaNode != null)
     {
         if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null) 
         {
             if (formulaNode.Attributes["id"] != null) 
             {
                 formulaIDRef_ = formulaNode.Attributes["id"].Value;
                 Formula ob = new Formula(formulaNode);
                 IDManager.SetID(formulaIDRef_, ob);
             }
             else if (formulaNode.Attributes["href"] != null)
             {
                 formulaIDRef_ = formulaNode.Attributes["href"].Value;
             }
             else
             {
                 formula_ = new Formula(formulaNode);
             }
         }
         else
         {
             formula_ = new Formula(formulaNode);
         }
     }
     
 
     XmlNode encodedDescriptionNode = xmlNode.SelectSingleNode("encodedDescription");
     
     if (encodedDescriptionNode != null)
     {
         if (encodedDescriptionNode.Attributes["href"] != null || encodedDescriptionNode.Attributes["id"] != null) 
         {
             if (encodedDescriptionNode.Attributes["id"] != null) 
             {
                 encodedDescriptionIDRef_ = encodedDescriptionNode.Attributes["id"].Value;
                 XsdTypeBase64Binary ob = new XsdTypeBase64Binary(encodedDescriptionNode);
                 IDManager.SetID(encodedDescriptionIDRef_, ob);
             }
             else if (encodedDescriptionNode.Attributes["href"] != null)
             {
                 encodedDescriptionIDRef_ = encodedDescriptionNode.Attributes["href"].Value;
             }
             else
             {
                 encodedDescription_ = new XsdTypeBase64Binary(encodedDescriptionNode);
             }
         }
         else
         {
             encodedDescription_ = new XsdTypeBase64Binary(encodedDescriptionNode);
         }
     }
     
 
     XmlNode calculationDatesNode = xmlNode.SelectSingleNode("calculationDates");
     
     if (calculationDatesNode != null)
     {
         if (calculationDatesNode.Attributes["href"] != null || calculationDatesNode.Attributes["id"] != null) 
         {
             if (calculationDatesNode.Attributes["id"] != null) 
             {
                 calculationDatesIDRef_ = calculationDatesNode.Attributes["id"].Value;
                 AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
                 IDManager.SetID(calculationDatesIDRef_, ob);
             }
             else if (calculationDatesNode.Attributes["href"] != null)
             {
                 calculationDatesIDRef_ = calculationDatesNode.Attributes["href"].Value;
             }
             else
             {
                 calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
             }
         }
         else
         {
             calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
         }
     }
     
 
 }
示例#12
0
        public LegAmount(XmlNode xmlNode)
        {
            XmlNode currencyNode = xmlNode.SelectSingleNode("currency");

            if (currencyNode != null)
            {
                if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null)
                {
                    if (currencyNode.Attributes["id"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["id"].Value;
                        IdentifiedCurrency ob = new IdentifiedCurrency(currencyNode);
                        IDManager.SetID(currencyIDRef_, ob);
                    }
                    else if (currencyNode.Attributes["href"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency_ = new IdentifiedCurrency(currencyNode);
                    }
                }
                else
                {
                    currency_ = new IdentifiedCurrency(currencyNode);
                }
            }


            XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");

            if (determinationMethodNode != null)
            {
                if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null)
                {
                    if (determinationMethodNode.Attributes["id"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                        IDManager.SetID(determinationMethodIDRef_, ob);
                    }
                    else if (determinationMethodNode.Attributes["href"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                    }
                }
                else
                {
                    determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                }
            }


            XmlNode currencyReferenceNode = xmlNode.SelectSingleNode("currencyReference");

            if (currencyReferenceNode != null)
            {
                if (currencyReferenceNode.Attributes["href"] != null || currencyReferenceNode.Attributes["id"] != null)
                {
                    if (currencyReferenceNode.Attributes["id"] != null)
                    {
                        currencyReferenceIDRef_ = currencyReferenceNode.Attributes["id"].Value;
                        IdentifiedCurrencyReference ob = new IdentifiedCurrencyReference(currencyReferenceNode);
                        IDManager.SetID(currencyReferenceIDRef_, ob);
                    }
                    else if (currencyReferenceNode.Attributes["href"] != null)
                    {
                        currencyReferenceIDRef_ = currencyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
                    }
                }
                else
                {
                    currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
                }
            }


            XmlNode referenceAmountNode = xmlNode.SelectSingleNode("referenceAmount");

            if (referenceAmountNode != null)
            {
                if (referenceAmountNode.Attributes["href"] != null || referenceAmountNode.Attributes["id"] != null)
                {
                    if (referenceAmountNode.Attributes["id"] != null)
                    {
                        referenceAmountIDRef_ = referenceAmountNode.Attributes["id"].Value;
                        ReferenceAmount ob = new ReferenceAmount(referenceAmountNode);
                        IDManager.SetID(referenceAmountIDRef_, ob);
                    }
                    else if (referenceAmountNode.Attributes["href"] != null)
                    {
                        referenceAmountIDRef_ = referenceAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceAmount_ = new ReferenceAmount(referenceAmountNode);
                    }
                }
                else
                {
                    referenceAmount_ = new ReferenceAmount(referenceAmountNode);
                }
            }


            XmlNode formulaNode = xmlNode.SelectSingleNode("formula");

            if (formulaNode != null)
            {
                if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null)
                {
                    if (formulaNode.Attributes["id"] != null)
                    {
                        formulaIDRef_ = formulaNode.Attributes["id"].Value;
                        Formula ob = new Formula(formulaNode);
                        IDManager.SetID(formulaIDRef_, ob);
                    }
                    else if (formulaNode.Attributes["href"] != null)
                    {
                        formulaIDRef_ = formulaNode.Attributes["href"].Value;
                    }
                    else
                    {
                        formula_ = new Formula(formulaNode);
                    }
                }
                else
                {
                    formula_ = new Formula(formulaNode);
                }
            }


            XmlNode encodedDescriptionNode = xmlNode.SelectSingleNode("encodedDescription");

            if (encodedDescriptionNode != null)
            {
                if (encodedDescriptionNode.Attributes["href"] != null || encodedDescriptionNode.Attributes["id"] != null)
                {
                    if (encodedDescriptionNode.Attributes["id"] != null)
                    {
                        encodedDescriptionIDRef_ = encodedDescriptionNode.Attributes["id"].Value;
                        XsdTypeBase64Binary ob = new XsdTypeBase64Binary(encodedDescriptionNode);
                        IDManager.SetID(encodedDescriptionIDRef_, ob);
                    }
                    else if (encodedDescriptionNode.Attributes["href"] != null)
                    {
                        encodedDescriptionIDRef_ = encodedDescriptionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        encodedDescription_ = new XsdTypeBase64Binary(encodedDescriptionNode);
                    }
                }
                else
                {
                    encodedDescription_ = new XsdTypeBase64Binary(encodedDescriptionNode);
                }
            }


            XmlNode calculationDatesNode = xmlNode.SelectSingleNode("calculationDates");

            if (calculationDatesNode != null)
            {
                if (calculationDatesNode.Attributes["href"] != null || calculationDatesNode.Attributes["id"] != null)
                {
                    if (calculationDatesNode.Attributes["id"] != null)
                    {
                        calculationDatesIDRef_ = calculationDatesNode.Attributes["id"].Value;
                        AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
                        IDManager.SetID(calculationDatesIDRef_, ob);
                    }
                    else if (calculationDatesNode.Attributes["href"] != null)
                    {
                        calculationDatesIDRef_ = calculationDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
                    }
                }
                else
                {
                    calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
                }
            }
        }