设为首页
加入收藏
站内地图
旧版入口
当前位置:首页 > 站长学院 > 网络编程 > ASP.NET

dot net html分析类库

作者:佚名 出处:网络转载 时间:11-15 点击:

内容载入中...
     这里有个 非常好的分析 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.
  
  
  http://www.cnblogs.com/wujun/archive/2006/10/31/545646.HTML
  
  
    。

收藏本文:
】【打印页面】【推荐给朋友】【关闭窗口

站长学院

推荐信息