0

So I just started to play around with HtmlAgilityPack for C#, so I'm still learning and I'm starting to look into how to use SelectNodes and Attributes. So I have seen examples like link.Attributes("href"), htmlDoc.DocumentNode.SelectNodes("//a[@href]") and so on, but just by looking at it I have no idea what "//a[@href]" does and I haven't been able to find a list or documentation of what all the values I can use and how to use them.

I have tried searching my self, but I haven't been able to find anything useful and the documentation that comes with HtmlAgilityPack hasn't helped. I'm guessing that it's more of me just not knowing what I'm looking for and what I need to search for. So any help as to where to look for help on how to fully use SelectNodes and Attributes would be greatly appreciated.

Thank you.

4

1 回答 1

-1

HtmlAgilityPack 网站所述

这是一个敏捷的 HTML 解析器,它构建一个读/写 DOM 并支持普通的 XPATH 或 XSLT。

查找XPathXSLT并比较语法应该不会太难。

于 2014-02-23T01:05:33.057 回答