C#适合这个吗? [英] Is C# appropriate for this ?

查看:58
本文介绍了C#适合这个吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务涉及从某些网页下载数据。

很多关于表单(点击按钮,选择图标

等)以及粘贴HTML以从结果网页中提取表格。


我是否在PHP(或* shudder * Perl)或C#中做到了这一点。我知道C#语言是互联网感知吗? (但我提到的另一种语言也是如此。


显然,这是一个C#ng,没有奖品可以猜测偏见的地方

会撒谎 - 但是,如果有人能指出哪里可以说明其他语言优于其他语言 - 以及任何陷阱,那么我将非常感激。

(或缺点)我可能需要注意......

I have a task which involves downloading data from some web pages. There
is a lot of messing about with forms (clicking buttons, selecting icons
etc) as well as pasrsing HTML to extract tables from the resulting web page.

I am torn as to whether to do this in PHP (or *shudder* Perl) or C#. I
know the C# language is "internet aware" (but so are the other
languages I mentioned.

Obviously, this being a C# ng, no prizes for guessing where the bias
will lie - BUT, I would be very grateful if anyone could point out where
C# may have an edge over the other languages - as well as any "gotchas"
(or drawbacks) I may need to be aware of ...

推荐答案

位字节,


是的,你绝对可以这样做。


我建议您考虑使用MSHTML。这是

microsoft在Internet Explorer中用于解析的文档对象模型从web下载的
页面。


虽然你可以通过C#使用它,但你真的不喜欢如果

您不想使用它,则必须使用它.MSHTML是一个COM组件,因此可以通过

访问任何提供COM访问权限的语言组件(.NET确实如此,

其他开发技术的数量)。


希望这会有所帮助。

-

- 尼古拉斯Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


位字节 < fl ** @ flop.comwrote in message

news:V4 ******************** @ bt.com ...
Bit byte,

Yes, you can definitely do this.

I would recommend that you look into using MSHTML for this. This is the
document object model that microsoft uses in internet explorer for parsing
pages that are downloaded from the web.

While you can use this through C#, you really don''t have to use it if
you don''t want to. MSHTML is a COM component, and therefore, accessible by
any language that offers access to COM components (.NET does, as do a good
number of other development technologies).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bit byte" <fl**@flop.comwrote in message
news:V4********************@bt.com...

>我的任务涉及从某些网页下载数据。表格(点击按钮,选择图标等)以及粘贴HTML以从结果网页中提取表格有很多混乱。


我是否在PHP(或* shudder * Perl)或C#中执行此操作。我知道C#语言是互联网感知吗? (但其他语言也是如此。

我提到过。


显然,这是一个C#ng,没有奖品可以猜测偏见会在哪里

谎言 - 但是,如果有人能指出C#可能会比其他语言优于其他语言 - 以及任何陷阱(或

缺点)我可能需要注意......
>I have a task which involves downloading data from some web pages. There is
a lot of messing about with forms (clicking buttons, selecting icons etc)
as well as pasrsing HTML to extract tables from the resulting web page.

I am torn as to whether to do this in PHP (or *shudder* Perl) or C#. I
know the C# language is "internet aware" (but so are the other languages
I mentioned.

Obviously, this being a C# ng, no prizes for guessing where the bias will
lie - BUT, I would be very grateful if anyone could point out where C# may
have an edge over the other languages - as well as any "gotchas" (or
drawbacks) I may need to be aware of ...



On Fri,07 Jul 2006 03:34: 12 +0100,位字节写道:
On Fri, 07 Jul 2006 03:34:12 +0100, Bit byte wrote:

我有一项任务涉及从某些网页下载数据。有

很多弄乱表格(点击按钮,选择图标

等)以及粘贴HTML以从结果网页中提取表格

页面。


我是否在PHP(或* shudder * Perl)或C#中做了这件事。我知道C#语言是互联网感知(但另一方面也是如此)

我提到的语言。


显然,这是一个C#ng,没有奖品可以猜测偏见

会在哪里说谎 - 但是,如果有人能指出哪里,我会非常感激

C#可能优于其他语言 - 以及任何陷阱

(或缺点)我可能需要注意...
I have a task which involves downloading data from some web pages. There
is a lot of messing about with forms (clicking buttons, selecting icons
etc) as well as pasrsing HTML to extract tables from the resulting web
page.

I am torn as to whether to do this in PHP (or *shudder* Perl) or C#. I
know the C# language is "internet aware" (but so are the other
languages I mentioned.

Obviously, this being a C# ng, no prizes for guessing where the bias
will lie - BUT, I would be very grateful if anyone could point out where
C# may have an edge over the other languages - as well as any "gotchas"
(or drawbacks) I may need to be aware of ...



C#语言完全不知道互联网,知道Eskymoe知道

咖喱。 PHP和Perl是旧时尚解释器,所以慢慢执行比较

到C#。

C# language not know internet at all, knows as much as Eskymoe knows about
curry. PHP and Perl are old fashion interpreter so slowly execute compare
to C#.


位字节写道:
Bit byte wrote:

我的任务涉及从某些网页下载数据。

很多关于表单(点击按钮,选择图标

等)以及粘贴HTML以从结果网页中提取表格。


我是否在PHP(或* shudder * Perl)或C#中做到了这一点。我知道C#语言是互联网感知吗? (但我提到的另一种语言也是如此。


显然,这是一个C#ng,没有奖品可以猜测偏见的地方

会撒谎 - 但是,如果有人能指出哪里可以说明其他语言优于其他语言 - 以及任何陷阱,那么我将非常感激。

(或缺点)我可能需要知道...
I have a task which involves downloading data from some web pages. There
is a lot of messing about with forms (clicking buttons, selecting icons
etc) as well as pasrsing HTML to extract tables from the resulting web page.

I am torn as to whether to do this in PHP (or *shudder* Perl) or C#. I
know the C# language is "internet aware" (but so are the other
languages I mentioned.

Obviously, this being a C# ng, no prizes for guessing where the bias
will lie - BUT, I would be very grateful if anyone could point out where
C# may have an edge over the other languages - as well as any "gotchas"
(or drawbacks) I may need to be aware of ...



我仍​​然没有咬紧牙关,做的不仅仅是读一本PHP书,

但是Perl可以做的任何事情,C#可以做得更好。这可能是一个轻微的夸张,因为Perl确实有几乎所有的库,

但它可能不是,因为FCL非常全面。我知道

最近所有的屏幕抓取小程序,我曾经在

Perl,我现在使用C#:


* FCL WebRequest与Perl

库一样易于使用同步下载网页。

* FCL正则表达式可以做任何Perl正则表达式可以做的事......还有更多。


*上传文件同样容易(通过FTP)在C#中和Perl一样,并且

你甚至不需要创建一个临时文件。


而且踢球者认为C#更容易阅读。


-

成为第一个评论我新书的人!


..NET 2.0 Delphi程序员 www.midnightbeach.com/.net

Delphi技能使.NET易于学习印刷,商店。

I still haven''t bitten the bullet and done more than read a PHP book,
but "anything Perl can do, C# can do better." That may be a slight
exaggeration, as Perl does have libraries for just about everything,
but it''s probably not, as the FCL is awfully comprehensive. I do know
that lately all the "screen scraping" applets that I used to do in
Perl, I now do in C#:

* The FCL WebRequest is just as easy to use as the Perl
libraries that synchronously download web pages.

* The FCL Regex can do anything the Perl regex can do ... and more.

* It''s just as easy to upload files (via FTP) in C# as in Perl, and
you don''t even have to create a temp file.

And the kicker is that the C# is much easier to read.

--
Be the first to review my new book!

..NET 2.0 for Delphi Programmers www.midnightbeach.com/.net
Delphi skills make .NET easy to learn In print, in stores.


这篇关于C#适合这个吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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