阅读网页内容 [英] Read the content of a web page

查看:98
本文介绍了阅读网页内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在用C#设计代码来下载网页的内容,但是它不应该带有html标签.

下载整个页面后如何下载或删除它.

在此先感谢.
govardhan

Hi All,

I am designing a code in C# to download the content of a webpage, but it should not have the html tags.

How can i download it or otherwise remove it after downloading the whole page.

Thanks in Advance.
govardhan

推荐答案

签出
Check out HttpWebRequest.GetResponse[^].

There is a nice example on how to get content from a web site.
About stripping out HTML tags, it is somewhat more complex to do.

One way is to use Regular Expression to replace HTML tags, but using Regular Expression on a HTML is not good and can be very tricky.


这篇关于阅读网页内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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