コード例 #1
0
        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)");
        }
コード例 #2
0
 private void Reset()
 {
     treeBuilder = new DomTreeBuilder();
     tokenizer   = new Tokenizer(treeBuilder, false);
     treeBuilder.IsIgnoringComments = false;
 }