Question

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.

Was it helpful?

Solution

As stated on the website of HtmlAgilityPack:

This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT.

it shouldn't be too hard to lookup XPath or XSLT and compare the syntax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top