public void Parse(TextReader input, 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(); }
public void Parse(TextReader input, IContentHandler handler) { this.reader = input; this.handler = handler; handler.OnStartParsing(this); while (Peek() >= 0) { ReadContent(); } buffer.Length = 0; if (elementNames.Count > 0) { throw Error(String.Format("Insufficient close tag: {0}", elementNames.Peek())); } Cleanup(); }
public void Parse(TextReader input, IContentHandler handler) { this.reader = input; this.handler = handler; handler.OnStartParsing(this); while (Peek() >= 0) { ReadContent(); } HandleBufferedContent(); if (elementNames.Count > 0) throw Error(String.Format("Insufficient close tag: {0}", elementNames.Peek())); handler.OnEndParsing(this); Cleanup(); }