开发者

Trying to use HtmlAgilityPack

开发者 https://www.devze.com 2023-01-31 08:05 出处:网络
Im having problems trying to install the HtmlAgilityPack.dll ver 1.4. I\'ve copied the files into my windows\\system32 folder and tried regsvr32 htmlagilitypack.dll in run.

Im having problems trying to install the HtmlAgilityPack.dll ver 1.4. I've copied the files into my windows\system32 folder and tried regsvr32 htmlagilitypack.dll in run.

I got the following error:

The module was loaded but the entry point DllUnregisterServer was not found.

It seems to be a common library us开发者_高级运维ed by many people on SO so the dll's cant be corrupted. How do I fix this?


The reason you can't use regsvr32 is because the HTML Agility pack isn't a COM library. It's written in .NET, so you need to reference from a .NET project.

  1. Download the latest zip file and extract somewhere on your local hard disk e.g. c:\SharedLibs\HtmlAgilityPack.
  2. Launch Visual Studio (or one of the VS Express editions)
  3. Create a new project or open an existing one.
  4. In solution explorer right click on References and click Add Reference.
  5. Click the Browse tab and browse to where you extracted the agility pack
  6. Select the HtmlAgilityPack.dll DLL
  7. Click OK

Refer to the CodePlex site:

Html Agility Pack Home
Html Agility Pack Examples

Here's a couple of links I dug up in everyone's favourite search engine:

A simple web crawler in C# using HtmlAgilityPack
.NET Html Agility Pack: How to use malformed HTML just like it was well-formed XML...

0

精彩评论

暂无评论...
验证码 换一张
取 消