So I m using Htmlagilitypack on server side to parse html in C#. Here's a Question.. i have 2 div elements
<div>
<a data-clear="movies-something"></a>
<p data-clear="movies-something"></p>
</div>
<div>
<a data-clear="music-something"></a>
<p data-clear="music-something"></p>
</div>
i am looping through the div elements and want to find specific data-clear attributes for that. problem is when i am selecting nodes using
var cols = fdm.SelectNodes("//@data-clear");
on second case i am finding 4 instead of 2 columns..
how to select within only currently looping through div
Change your XPATH expression on follows