// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.IO; using System.Xml; namespace E { public class Program { private static void Test(string s) { Console.WriteLine(s); XmlReader xr = new XmlTextReader(new StringReader(s)); while(xr.Read()) { if(xr.NodeType == XmlNodeType.Element) { Console.WriteLine("{0} {1}", xr.NamespaceURI, xr.LocalName); } } } public static void Main(string[] args) { Test("123ABC"); Test("123ABC"); Test("123ABC"); } } }