/// <summary>Initializes a new instance of the <see cref="T:System.Security.SecurityElement" /> class with the specified tag and text.</summary>
/// <param name="tag">The tag name of the XML element. </param>
/// <param name="text">The text content within the element. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="tag" /> parameter is null. </exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="tag" /> parameter or <paramref name="text" /> parameter is invalid in XML. </exception>
public SecurityElement(string tag, string text)
{
if (tag == null)
{
throw new ArgumentNullException("tag");
}
if (!SecurityElement.IsValidTag(tag))
{
throw new ArgumentException(Locale.GetText("Invalid XML string") + ": " + tag);
}
this.tag = tag;
this.Text = text;
}