Reputation: 531
As you see in the picture an item has subitems which are <th>
and <td>
. When I query item to get <td>
, it returns null. Here is the code: item.SelectSingleNode("td")
Shouldn't it get td node?
(https://i.sstatic.net/EXu7W.png)
Upvotes: 0
Views: 113
Reputation: 89295
It seems that <td>
isn't direct child of current item
. To select descendant that isn't direct child you can use double slashes (//
) :
item.SelectSingleNode(".//td")
And if I see it correctly, <td>
is child of <th>
, so you can also do this way :
item.SelectSingleNode("th/td")
Upvotes: 1