16

I am new to C#(started today) and I am trying to understand someone else's code which used the HtmlDocument class in HtmlAgilliyPack to parse HTML documents. I cannot find any documentation of this package. The HtmlAgilityPack's project webpage says that there is no documentation available. If someone could point me to the documentation or explain the following methods(intermediate methods too) then that would be really helpful:

 - HtmlDocument.DocumentNode
 - HtmlDocument.DocumentNode.ssn
 - HtmlDocument.DocumentNode.GetElementbyId
 - HtmlDocument.DocumentNode.GetElementbyId(..).sns
 - HtmlDocument.DocumentNode.ssn(...).Attributes["value"].Value.ed().ns()

Thanks in advance!

Bob
  • 561
  • 1
  • 6
  • 18
  • 9
    I do not understand the down votes. I have clearly stated the the _official_ webpage of a popular third party library doesn't provide and document. I have no where said that there are any bugs and I have only stated that I need help finding exact documentation and understanding the code. I will restate what I actually need by just copy pasting what I said. 'If someone could point me to the documentation or explain the following methods(intermediate methods too) then that would be really helpful'. – Bob Aug 20 '15 at 06:55
  • 1
    You got an upvote sir, for asking the right question and doubting the community where you are 'in my opinion' correct. – Jean-Paul Apr 13 '16 at 14:49
  • The downvotes are probably because *"...Questions asking us to recommend or **find a** book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam."* Note the "find" part of that. You're asking where the documentation is, which makes the question off-topic. SO is not everything for everyone, some perfectly good questions in the general sense ("Where the heck are the docs?!") are off-topic for SO. A lot of people downvote off-topic questions. *(I didn't downvote it.)* – T.J. Crowder May 30 '16 at 13:17

4 Answers4

12

You can download HtmlAgilityPack Documents CHM file from here.

If chm file contents are not visible then un-check Always ask before opening this file check-box as shown in screen shot

enter image description here

Note: The above dialog appears for unsigned files

enter image description here

UPDATE:

HtmlAgilityPack Documentation is available here

NASSER
  • 5,900
  • 7
  • 38
  • 57
  • Thanks. There are certain methods e.g HtmlNode.sns() which the documentation does not explain...Is it outdated? – Bob Aug 20 '15 at 23:39
  • OK, I will search for it. – NASSER Aug 21 '15 at 02:26
  • Is this really the quality of nuget packages? A broken chm provided in a link that can't be found anywhere? Downloaded the chm but it only gives me blank pages on windows 8. – HMR Jan 19 '17 at 02:59
  • @HMR You have to unblock the chm file after you download it [as explained here](https://www.google.fr/search?q=unblock+downloaded+file). – ChrisW Dec 05 '17 at 18:40
  • The CHM link above is no longer valid. Any idea how I can get it? Thx – pghcpa Oct 14 '20 at 23:49
6

CHM files can be a hassle. Check out nudoq.com - it combines API documentation with community comments (via Disqus). I've found its interface clean and easy to use.

Screenshot:

Nudoq - HtmlDocument Example

Community
  • 1
  • 1
Mike
  • 3,641
  • 3
  • 29
  • 39
  • Nudoq seems to be no more. Any idea where I can get the CHM or the same content that describes the entire object model? The CHM link above is also outdated and the documentation on the site is too cursory. Thx – pghcpa Oct 14 '20 at 23:49
1

HTML Agility Pack massages an HTML document into looking like an XmlDocument. Read the documentation on XmlDocument for these methods.

Richard Schneider
  • 34,944
  • 9
  • 57
  • 73
  • Thank you this was very helpful. I still couldn't find the explanation for ed() method in it. – Bob Aug 20 '15 at 07:00
1

The documentation is now available here https://html-agility-pack.net/documentation

coderpatros
  • 464
  • 5
  • 9