Using system; using system.xml;
Namespace XMLTest {/// Using system; using system.xml; Namespace XMLTest {/// if (members == null || members.Count == 0) return innerXml; else {System.IO.StringWriter w = new System.IO.StringWriter (); XmlTextWriter xw = new XmlTextWriter (w); foreach (object key in MEMBERS.KEYS) {xw.writestartelement (key.writeString (Members [key] .tostring ()); xw.writeEndelement ();} return w.TOString ();}} protected string innerXML; Public string innerxml {get {return innerxml;}} #endregion /// innerXml input> public SimpleTagControl (string innerXml) {init (innerXml);} private System.Collections.SortedList members; private void createMember (string key, string value) {if (members == NULL) {membrs = new system.collections.sortedList ();} if (metainskey) {members.add (key, value);} else {members [key] = value;}} private void init (string innerXml) {this.innerXml = innerXml; if (innerXml.StartsWith ( "<")) {System.IO.StringReader sr = new System.IO.StringReader (innerXml); XmlTextReader reader = new XmlTextReader (sr ); while (reader.Read ()) {if (reader.NodeType == XmlNodeType.Text) {return;} if (reader.NodeType == XmlNodeType.Element) {createMember (reader.LocalName, reader.ReadInnerXml ()) ;}}}}}} -------------------------------- [Stathread] static void main (string [] args) {class1 c1 = new class1 (); c1.transform (); console.readline ();} public void transform () {String XML = Welcome to this issue, the initial code needs to be improved ... - Fallseir.li 2005.4.23 0:36