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 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 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 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); } } } }