HTML解析VB.Net [英] HTML Parsing in VB.Net

查看:93
本文介绍了HTML解析VB.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有任何在VB.Net中解析WebPages的好例子。我的

应用程序需要从某些HTML表中获取信息,而且我没有能够找到解决问题的好方法。我已经研究了

RegularExpressions,但发现它对于我试图完成的事情来说相当复杂。我希望有一些类型的

实用程序可以让我在一个树中解析像

结构的网页。我发现了一个名为HTMLAgilityPack的实用工具,但它似乎很难用到b
。如果任何人有任何建议或例子,我会非常感激。


谢谢

柯蒂斯

Does anyone have any good examples of parsing WebPages in VB.Net. My
application needs to get information from certain HTML tables and I haven''t
been able to find a good way to approach the problem. I have researched
RegularExpressions but have found it to be rather complicated for what I am
attempting to accomplish. I was hoping that there would be some type of
utility that would allow me to parse through the webpage in a tree like
structure. I found one utility called HTMLAgilityPack but it seems to be a
little difficult to work with. If any one has any suggestions or examples I
would really appreciate it.

Thanks
Curtis

推荐答案

你好Curtis


如果你想以树形结构访问网页那么你可能是

看着像微软的mshtml这样的东西。它使一个页面可以作为一个文档对象模型(DOM)访问,就像你可以使用自动化来读取一个

Word文档作为DOM。您可以通过在应用程序中使用WebBrowser

控件(包装mshtml)或直接使用mshtml来获取页面。


你有网络吗?内存中的页面,或者你是否也想要从互联网上取回它?

HTH


Charles

柯蒂斯 < CS ***** @ hotmail.com>在留言中写道

新闻:e0 ************** @ TK2MSFTNGP09.phx.gbl ...
Hi Curtis

If you want to access a web page as a tree structure then you are probably
looking at something like Microsoft''s mshtml. It makes a page accessible as
a document object model (DOM), just like you might use automation to read a
Word document as a DOM. You can either get the page by using the WebBrowser
control (which wraps mshtml) in your application, or using mshtml directly.

Do you have your web page in memory, or are you also wanting to retrieve it
from the internet?

HTH

Charles
"Curtis" <cs*****@hotmail.com> wrote in message
news:e0**************@TK2MSFTNGP09.phx.gbl...
有没有人有任何好处在VB.Net中解析WebPages的示例。我的
应用程序需要从某些HTML表中获取信息,而且我无法找到解决问题的好方法。我已经对RegularExpressions进行了研究,但发现它对我试图完成的事情来说相当复杂。我希望有一些类型的实用工具可以让我在一个类似结构的树中解析网页。我发现了一个名为HTMLAgilityPack的实用程序,但它似乎有点难以使用。如果任何人有任何建议或例子我会非常感激。

谢谢
柯蒂斯
Does anyone have any good examples of parsing WebPages in VB.Net. My
application needs to get information from certain HTML tables and I
haven''t been able to find a good way to approach the problem. I have
researched RegularExpressions but have found it to be rather complicated
for what I am attempting to accomplish. I was hoping that there would be
some type of utility that would allow me to parse through the webpage in a
tree like structure. I found one utility called HTMLAgilityPack but it
seems to be a little difficult to work with. If any one has any
suggestions or examples I would really appreciate it.

Thanks
Curtis



嗨查尔斯,


现在怎么样?

我现在告诉大家使用AgilityPack,因为我是

知道你很了解MsHtml并且发现AgilityPack更容易使用。


我现在如何向你发送这条消息?


对我来说,告诉MsHTML更容易,因为如果有问题我可以告诉更多




: - )


Cor
Hi Charles,

What now?

I am now telling to everybody to use the AgilityPack, just because that I
know that you know MsHtml well and found that AgilityPack easier to use.

How would I place this message from you now?

For me it is easier to tell MsHTML because than I can tell something more
about it if there are questions.

:-)

Cor


Hi Cor


我不确定我是否完全关注你。 ..我之前下载了AgilityPack一些

,但从未真正使用它,因为我已经在mshtml中投入了大量资金

和WebBrowser控件。也许我应该留给你或其他人来支付
推荐AgilityPack?


Charles

" Cor Ligthert [MVP] " <无************ @ planet.nl>在消息中写道

news:uE **************** @ TK2MSFTNGP10.phx.gbl ...
Hi Cor

I''m not sure I completely follow you ... I downloaded the AgilityPack some
time ago, but never really used it as I already had a lot invested in mshtml
and the WebBrowser control. Perhaps I should leave it to you or others to
recommend the AgilityPack?

Charles
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uE****************@TK2MSFTNGP10.phx.gbl...
嗨Charles,

现在怎么办?

我现在告诉大家使用AgilityPack,因为我知道你很了解MsHtml并且发现AgilityPack更容易使用。

我现在如何向您发送此消息?

对我来说,告诉MsHTML更容易,因为我可以告诉更多关于它的信息有问题。

:-)

Cor
Hi Charles,

What now?

I am now telling to everybody to use the AgilityPack, just because that I
know that you know MsHtml well and found that AgilityPack easier to use.

How would I place this message from you now?

For me it is easier to tell MsHTML because than I can tell something more
about it if there are questions.

:-)

Cor



这篇关于HTML解析VB.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆