private void Reset() { treeBuilder = new DomTreeBuilder(); tokenizer = new Tokenizer(treeBuilder, false); treeBuilder.IsIgnoringComments = false; // optionally: report errors and more //treeBuilder.ErrorEvent += // (sender, a) => // { // ILocator loc = tokenizer as ILocator; // Console.WriteLine("{0}: {1} (Line: {2})", a.IsWarning ? "Warning" : "Error", a.Message, loc.LineNumber); // }; //treeBuilder.DocumentModeDetected += (sender, a) => Console.WriteLine("Document mode: " + a.Mode.ToString()); //tokenizer.EncodingDeclared += (sender, a) => Console.WriteLine("Encoding: " + a.Encoding + " (currently ignored)"); }
private void Reset() { treeBuilder = new DomTreeBuilder(); tokenizer = new Tokenizer(treeBuilder, false); treeBuilder.IsIgnoringComments = false; }