0
votes

I'm new to the HTML agility pack and I understand the basics of XPath.

However I'm having an issue, is there any way to get all the nodes that contain another type of node?

For example: I want to get all of the <tr> that contain an <a> tag?

Whenever I do //tr/a what I end up with are the links.

1

1 Answers

0
votes

[condition] is XPath way of saying "where". So your XPath would be something like //tr[a] or if you need deeper child nodes use appropriate axis: //tr[descendant::a].

There are some useful samples on MSDN - XPath Examples