惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
小众软件
小众软件
I
InfoQ
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Martin Fowler
Martin Fowler
月光博客
月光博客
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
V
Visual Studio Blog
博客园 - 叶小钗
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
GbyAI
GbyAI
P
Proofpoint News Feed
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - hello csharp

[导入]Nhibernate引入自定义Membership和Role 推荐个不错的屏幕捕获程序 测试Google Docs 发布的文章.。。 Guidelines – a hidden feature for the Visual Studio Editor Gridview, ObjectDataSource Making life easy Applied MS Reporting Services 101 using Smart Client Database Provider-based ASP.NET Membership Provider HTMLEditor Provider - How to write a custom provider for ASP.NET 2.0 Firebug-javascript/css/ajax/dom调试器【这款不错】 Automatic Sql Server Backup Utility Using sqlserveragent LiveWriter测试 发布个小软件给大伙玩玩 [js小技巧]鼠标移到图片高亮度显示 系统发邮件测试 Dumbster 【小技巧】如何得到一个网页的所有a标记 herf 链接代码 读新浪博客示例[源代码下载] Intellisense for the NHibernate XML Schemas Develop Reports Using Crystal Reports in .NET 2005 [小技巧]winfrom使用多线程
dot net html分析类库
hello csharp · 2006-10-31 · via 博客园 - hello csharp

上次我写的
 【小技巧】如何得到一个网页的所有a标记 herf 链接代码
这样很是麻烦。

这里有个 非常好的分析 html的 类。
节约了不少时间。

项目地址
http://www.codeplex.com/Wiki/View.aspx?ProjectName=htmlagilitypack

For example, here is how you would fix all hrefs in an HTML file:

HtmlDocument doc = new HtmlDocument();
doc.Load("file.htm");
foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a@href")
{
HtmlAttribute att = link"href";
att.Value = FixLink(att);
}
doc.Save("file.htm");

If you want to participate to the project - because that's the whole purpose of putting the source there, right - use the forums or drop me a note (simon underscore mourier at hotmail dot com)!

Happy coding, scraping, scanning, html-ing, xhtml-ing, etc... :^)
Simon Mourier.