static void FreeHtmlParser(HtmlParser parser)
 {
     parser.ResetParser();
     lock (sharedParserLock1)
     {
         sharedParsers.Enqueue(parser);
     }
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
             


            //test web parser
            var parser = new HtmlParser();
            var blankHtmlDoc = new LayoutFarm.WebDom.Impl.HtmlDocument();
            var snapSource = new TextSource(this.richTextBox1.Text.ToCharArray());
            parser.Parse(snapSource, blankHtmlDoc, blankHtmlDoc.RootNode);

            this.treeView2.Nodes.Clear();
            var rootNode = new TreeNode("root");

            DescibeNode(blankHtmlDoc.RootNode, rootNode);

            treeView2.Nodes.Add(rootNode);
            this.treeView2.ExpandAll();
        }