Mono.Xml.SecurityParser.OnStartElement C# (CSharp) Method

OnStartElement() public method

public OnStartElement ( string name, MiniParser attrs ) : void
name string
attrs MiniParser
return void
        public void OnStartElement(string name, MiniParser.IAttrList attrs)
        {
            SecurityElement newel = new SecurityElement (name);
            if (root == null) {
                root = newel;
                current = newel;
            }
            else {
                SecurityElement parent = (SecurityElement) stack.Peek ();
                parent.AddChild (newel);
            }
            stack.Push (newel);
            current = newel;
            // attributes
            int n = attrs.Length;
            for (int i=0; i < n; i++)
                current.AddAttribute (attrs.GetName (i), attrs.GetValue (i));
        }