Microsoft.Xades.CompleteCertificateRefs.LoadXml C# (CSharp) Method

LoadXml() public method

Load state from an XML element
public LoadXml ( System xmlElement ) : void
xmlElement System XML element containing new state
return void
		public void LoadXml(System.Xml.XmlElement xmlElement)
		{
			XmlNamespaceManager xmlNamespaceManager;
			XmlNodeList xmlNodeList;
			
			if (xmlElement == null)
			{
				throw new ArgumentNullException("xmlElement");
			}
			if (xmlElement.HasAttribute("Id"))
			{
				this.id = xmlElement.GetAttribute("Id");
			}
			else
			{
				this.id = "";
			}

			xmlNamespaceManager = new XmlNamespaceManager(xmlElement.OwnerDocument.NameTable);
			xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

			xmlNodeList = xmlElement.SelectNodes("xsd:CertRefs", xmlNamespaceManager);
			if (xmlNodeList.Count != 0)
			{
				this.certRefs = new CertRefs();
				this.certRefs.LoadXml((XmlElement)xmlNodeList.Item(0));
			}
		}