title: Htmlagilitypack - Get all text + links inside of text
body: <p>I have a method which extracts text blocks that are over XX amount of words. The problem is that it wont return links inside of that text. </p>
  
  <p>My method:</p>
  
  <pre><code>public string getAllTextHTML(string _html)
  {
    string _allText = "";
    try
    {
      HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument();
      document.LoadHtml(_html);
  
      document.DocumentNode.Descendants()
        .Where(n =&gt; n.Name == "script" || n.Name == "style")
        .ToList()
        .ForEach(n =&gt; n.Remove());
  
      RemoveComments(document.DocumentNode);
  
      var root = document.DocumentNode;
      var sb = new StringBuilder();
      foreach (var node in root.DescendantNodesAndSelf())
      {
        if (!node.HasChildNodes)
        {
          string text = node.InnerHtml;
  
          if (!string.IsNullOrEmpty(text))
          {
            int antalOrd = WordCounting.CountWords1(text);
  
            if (antalOrd &gt; 25)
            {
              text = System.Web.HttpUtility.HtmlDecode(text);
              sb.AppendLine(text.Trim());
            }  
          } 
        }
      }
  
      _allText = sb.ToString();
    }
    catch (Exception)
    {
    }
  
    _allText = System.Web.HttpUtility.HtmlDecode(_allText);
    return _allText;
  }
  </code></pre>
  
  <p>How could i make this also get me the links within the text?</p>