Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

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

$
0
0
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();
                        htmldoc.LoadHtml(reportHTML);
                        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;
                                }
                                introw++;
                            }

                        }

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>