Your first problem with the SelectNodes comment SelectNodes not work, because "id" is not the name of the element, it is the name of the attribute. You used the correct syntax in your other expressions to select an attribute and compare the value. For example, //ElementName[@attributeName='value'] . I think that even [attributeName='value'] should work, but I have not tested this.
The syntax inside the SelectNodes function is called "XPath". This link can help you.
The seller node selected is the sibling node for the current iteration, which is img with the alt attribute. However, I think the correct syntax you want is just img[@alt] .
The next problem, when you say that it will not compile, check the error message, it will probably complain about arguments like arguments. sellers.Add I think that you need to call another HtmlNode, not an attribute that returns an expression inside the append.
Also, check out the Html Agility pack docs and other syntax issues.
source share