AgainMe AgainMe - 1 month ago 5
C# Question

Prevent HtmlAgilityPack to select particular class

I need to select all

inside a table, actually for doing this I wrote this code:

var tr = doc.DocumentNode.SelectNodes("//tr");

this working good, but I need to skip the tr that have this class:
round-head expanded loaded

Is possible tell to
to select all tr that doesn't have the class specified above? thanks.


Simply use the Xpath to check the value of an attribute:

//tr[@class != 'round-head expanded loaded']