打印

[asp.net教程] dot net html分析类库

dot net html分析类库

这里有个 非常好的分析 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

TOP

返回顶部
AYBlue

Processed in 0.045455 second(s), 7 queries.

当前时区 GMT+8, 现在时间是 2009-1-10 11:33 京ICP备06054220号

清除 Cookies - 联系我们 - 163K.com - Archiver - WAP