// 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 MyStringReader : StringReader { public MyStringReader(string s) : base(s) { if(s.Contains("")) { while(base.Peek() >= 0 && !base.ReadLine().Contains("]>")); } else { while(base.Peek() >= 0 && !base.ReadLine().Contains(""; string hdr2 = @" ]>"; string cnt1 = @" A BB BBB "; string cnt2 = @" A BB BBB XXX "; Parse(hdr1 + Environment.NewLine + cnt1); Parse(hdr1 + Environment.NewLine + cnt2); Parse(hdr2 + Environment.NewLine + cnt1); Parse(hdr2 + Environment.NewLine + cnt2); Parse("" + Environment.NewLine + ""); } } }