Ejemplo n.º 1
0
        public void OnStartElement(string name, SmallXmlParser.IAttrList attrs)
        {
            if (root == null)
            {
                root    = new XMLSection(name);
                current = root;
            }
            else
            {
                XMLSection parent = (XMLSection)stack.Peek();
                current = parent.createSection(name);
            }
            stack.Push(current);
            // attributes
            int n = attrs.Length;

            for (int i = 0; i < n; i++)
            {
                current.attrs[attrs.GetName(i)] = attrs.GetValue(i);
            }
        }