Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 450

New Post: problems with DocumentNode.SelectNodes() parameters

$
0
0
I am not sure what you are trying to parse out of that HTML. But, for example, if you need href of all anchor tags, you could do:
foreach (var link in doc.DocumentNode.SelectNodes("//a[@href]"))
{
    foreach (var linkAtt in link.Attributes)
    {
        linkAtt.Value.Dump();
    }
}
And you can change parameter for SelectNodes method to be be "//td" or "//div"

Yeah, unfortunately, I don't find complete documentation as well. Would be nice if anyone could point out where to look for.

Viewing all articles
Browse latest Browse all 450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>