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 閱讀(355) 評論(0)  編輯  收藏 所屬分類: dot net相關

          導航

          常用鏈接

          留言簿(44)

          新聞檔案

          2.動態語言

          3.工具箱

          9.文檔教程

          友情鏈接

          搜索

          最新評論

          主站蜘蛛池模板: 拉孜县| 嵩明县| 开原市| 沽源县| 湖口县| 北碚区| 温宿县| 马公市| 花莲市| 海口市| 石首市| 黎川县| 无极县| 石门县| 江陵县| 平遥县| 万盛区| 华容县| 根河市| 凭祥市| 礼泉县| 深州市| 崇州市| 北流市| 禄丰县| 桃园市| 平和县| 思南县| 大英县| 普定县| 云安县| 金平| 巴马| 贵定县| 汶川县| 黎川县| 汾西县| 马尔康县| 永登县| 凤庆县| 沾化县|