The CertRefs element contains a collection of Cert elements
예제 #1
0
        /// <summary>
        /// Load state from an XML element
        /// </summary>
        /// <param name="xmlElement">XML element containing new state</param>
        public void LoadXml(System.Xml.XmlElement xmlElement)
        {
            XmlNamespaceManager xmlNamespaceManager;
            XmlNodeList         xmlNodeList;

            if (xmlElement == null)
            {
                throw new ArgumentNullException(nameof(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));
            }
        }
예제 #2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public CompleteCertificateRefs()
 {
     this.certRefs = new CertRefs();
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 public CompleteCertificateRefs()
 {
     this.certRefs = new CertRefs();
 }
        /// <summary>
        /// Load state from an XML element
        /// </summary>
        /// <param name="xmlElement">XML element containing new state</param>
        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));
            }
        }