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); } }
public XMLSection loadXML(string xml) { root = null; Parse(new StringReader(xml), this); return(root); }
public void OnEndElement(string name) { current = (XMLSection)stack.Pop(); }