This project has moved. For the latest updates, please go here.

Added couple of nodes to the existing Node, Now im not able to find the added node in the 'Doc'

Topics: Developer Forum
Jul 19, 2013 at 12:13 PM
I have added the nodes to existing Node using the following code. Im not able to find the newly added node in the 'htmldoc'.
       HtmlDocument htmldoc = new HtmlDocument();
                        var newNode = HtmlNode.CreateNode(headerHTML);

       HtmlNodeCollection trnodes = htmldoc.DocumentNode.SelectNodes("//tr");

       int trcount = trnodes.Count();
                        if (trnodes != null)
                            int introw = 1;
                            for (int i=0; i<=trcount; i++)
                                if (introw >= 25)
                                    trnodes.Insert(i, newNode);
                                    introw = 1;