blogjava's web log

          blogjava's web log
          ...

          dot net html分析類庫


          上次我寫的
          ?【小技巧】如何得到一個網頁的所有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("http://a)
          {
          HtmlAttribute att = link
          ;
          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.

          posted on 2006-10-31 15:44 record java and net 閱讀(359) 評論(0)  編輯  收藏 所屬分類: dot net相關

          導航

          常用鏈接

          留言簿(44)

          新聞檔案

          2.動態語言

          3.工具箱

          9.文檔教程

          友情鏈接

          搜索

          最新評論

          主站蜘蛛池模板: 利川市| 乐东| 桐柏县| 抚顺县| 台安县| 治多县| 万山特区| 乌拉特中旗| 西藏| 浦城县| 皋兰县| 河北省| 寿光市| 三台县| 琼结县| 永仁县| 苗栗县| 铁岭市| 深州市| 府谷县| 大理市| 华坪县| 淮滨县| 南城县| 秦皇岛市| 博乐市| 波密县| 秭归县| 紫云| 云阳县| 绥中县| 那曲县| 吉林省| 东兰县| 无极县| 定南县| 昭平县| 嘉黎县| 宜兰县| 大同县| 镶黄旗|