June 2003
Intermediate to advanced
714 pages
22h 8m
English
SecurityElement
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.
Multiple types