Пример #1
0
 public void Parse(TextReader input, SmallXmlParser.IContentHandler handler)
 {
     this.reader  = input;
     this.handler = handler;
     handler.OnStartParsing(this);
     while (this.Peek() >= 0)
     {
         this.ReadContent();
     }
     this.HandleBufferedContent();
     if (this.elementNames.Count > 0)
     {
         throw this.Error(string.Format("Insufficient close tag: {0}", this.elementNames.Peek()));
     }
     handler.OnEndParsing(this);
     this.Cleanup();
 }