LayoutFarm.WebDom.Parser.HtmlParser.Parse C# (CSharp) Method

Parse() public abstract method

public abstract Parse ( TextSource textSnapshot, WebDocument htmldoc, DomElement currentNode ) : void
textSnapshot TextSource
htmldoc WebDocument
currentNode DomElement
return void
        public abstract void Parse(TextSource textSnapshot, WebDocument htmldoc, DomElement currentNode);
        public static HtmlParser CreateHtmlParser(ParseEngineKind engineKind)

Usage Example

Exemplo n.º 1
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();
        }