Skip to Content
Programming .NET Security
book

Programming .NET Security

by Adam Freeman, Allen Jones
June 2003
Intermediate to advanced
714 pages
22h 8m
English
O'Reilly Media, Inc.
Content preview from Programming .NET Security

Name

SecurityElement

Synopsis

public sealed class SecurityElement {
// Public Constructors
   public SecurityElement(string tag);
   public SecurityElement(string tag, string text);
// 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(string str);
   public static bool IsValidAttributeName(string name);
   public static bool IsValidAttributeValue(string value);
   public static bool IsValidTag(string tag);
   public static bool IsValidText(string text);
// Public Instance Methods
   public void AddAttribute(string name, string value);
   public void AddChild(SecurityElement child);
   public string Attribute(string name);
   public bool Equal(SecurityElement other);
   public SecurityElement SearchForChildByTag(string tag);
   public string SearchForTextOfTag(string tag);
   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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET Framework Security

.NET Framework Security

Brian A. LaMacchia, Sebastian Lange, Matthew Lyons, Rudi Martin, Kevin T. Price
.NET Security and Cryptography

.NET Security and Cryptography

Peter Thorsteinson, G. Gnana Arun Ganesh
ASP.NET Core Security

ASP.NET Core Security

Christian Wenz

Publisher Resources

ISBN: 0596004427Supplemental ContentErrata Page