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