var td = htmlNode.SelectNodes("td").Select(x => x.InnerText).ToList(); <td align="right"> <img src="templates/images/countmax.png"></td> 

The td variable contains only elements with the td tag, but I would like the img tag to be seen too.

    1 answer 1

    Your code can be rewritten as:

     var tdElements = htmlNode.SelectNodes("td").ToList(); 

    The variable tdElements now contains a list of HtmlNode objects, each of which corresponds to the <td> element and contains all the embedded information. In particular, a child <img> element can be retrieved from the tdElements[0].ChildNodes collection:

     var imgElement = tdElements[0].ChildNodes.FindFirst("img"); 

    And you can still extract `InnerText 'from each item:

     var innerText = tdElements[0].InnerText;