Name
SecurityElement
Synopsis
public sealed class SecurityElement { // Public Constructors public SecurityElement(stringtag
); public SecurityElement(stringtag
, stringtext
); // Public Instance Properties public Hashtable Attributes{set; get; } public ArrayList Children{set; get; } public string Tag{set; get; } public string Text{set; get; } // Public Static Methods public static string Escape(stringstr
); public static bool IsValidAttributeName(stringname
); public static bool IsValidAttributeValue(stringvalue
); public static bool IsValidTag(stringtag
); public static bool IsValidText(stringtext
); // Public Instance Methods public void AddAttribute(stringname
, stringvalue
); public void AddChild(SecurityElementchild
); public string Attribute(stringname
); public bool Equal(SecurityElementother
); public SecurityElement SearchForChildByTag(stringtag
); public string SearchForTextOfTag(stringtag
); public override string ToString( ); // overrides object }
This class implements a simple, lightweight XML object model for
encoding .NET security objects. A SecurityElement
object represents a single XML element that can contain a tag,
attributes, and text. To build a hierarchy of XML objects, add
SecurityElement
objects representing the child
nodes to an existing SecurityElement
object using
its Children
property or AddChild(
)
method. The ToString( )
method returns
a string containing the XML representation of the
SecurityElement
and all of its children.
Returned By
Multiple types
Get Programming .NET Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.