Microsoft.Xades.ClaimedRoles.GetXml C# (CSharp) Method

GetXml() public method

Returns the XML representation of the this object
public GetXml ( ) : XmlElement
return System.Xml.XmlElement
		public XmlElement GetXml()
		{
			XmlDocument creationXmlDocument;
			XmlElement retVal;

			creationXmlDocument = new XmlDocument();
			retVal = creationXmlDocument.CreateElement("ClaimedRoles", XadesSignedXml.XadesNamespaceUri);

			if (this.claimedRoleCollection.Count > 0)
			{
				foreach (ClaimedRole claimedRole in this.claimedRoleCollection)
				{
					if (claimedRole.HasChanged())
					{
						retVal.AppendChild(creationXmlDocument.ImportNode(claimedRole.GetXml(), true));
					}
				}
			}

			return retVal;
		}
		#endregion