ToXml() public method

public ToXml ( ) : SecurityElement
return SecurityElement
		public void FromXml ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();
			domapp.FromXml (se);
		}
		public void FromXml_NoVersion ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", se.Attribute ("class"));
			domapp.FromXml (w);
		}
		public void ToXml ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();
			Assert.AreEqual ("IMembershipCondition", se.Tag, "Tag");
			Assert.IsTrue (se.Attribute ("class").StartsWith ("System.Security.Policy.DomainApplicationMembershipCondition"), "class");
			Assert.AreEqual ("1", se.Attribute ("version"), "version");
			Assert.AreEqual (se.ToString (), domapp.ToXml (null).ToString (), "ToXml(null)");
			Assert.AreEqual (se.ToString (), domapp.ToXml (PolicyLevel.CreateAppDomainLevel ()).ToString (), "ToXml(PolicyLevel)");
		}
		public void FromXml_InvalidVersion ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", se.Attribute ("class"));
			w.AddAttribute ("version", "2");
			domapp.FromXml (w);
			// doesn't seems to care about the version number!
		}
		public void FromXml_NoClass ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("version", se.Attribute ("version"));
			domapp.FromXml (w);
			// doesn't even care of the class attribute presence
		}
		public void FromXml_InvalidClass ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();
			se.Attributes ["class"] = "Hello world";
			domapp.FromXml (se);
		}
		public void FromXml_WrongTagCase ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();
			se.Tag = "IMEMBERSHIPCONDITION"; // instedomapp of IMembershipCondition
			domapp.FromXml (se);
		}
		public void FromXml_InvalidTag ()
		{
			DomainApplicationMembershipCondition domapp = new DomainApplicationMembershipCondition ();
			SecurityElement se = domapp.ToXml ();
			se.Tag = "IMonoship";
			domapp.FromXml (se);
		}