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

New Post: Collection was modified error when removing nodes in v1.4

$
0
0

Fixed with this code:

private void ConvertContentTo(HtmlNode node)
{
      int i = 0;
      int childNodeCount = node.ChildNodes.Count;
      while (i < childNodeCount)
      {
           ConvertTo(node.ChildNodes[i]);
           childNodeCount = node.ChildNodes.Count;
           i++;
      }
}

Viewing all articles
Browse latest Browse all 655

Trending Articles



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