常用搜索: 北大青鸟系统分析师数据库系统工程师网络工程师软件设计师软件评测师信息安全工程师程序员网络管理员短信猫OracleSQL ServerDB2AndroidWindows操作系统

请教各位大师,请问如何匹配到网页中的动态数据?我搞了几天了,都搞不出来。

如:

<div class="list2">
<ol>
<li><href="http://news.163.com/07/0701/04/3I9QVL7H00011229.html">湖南一考生今年高考4门课程故意考零分(组图)</a></li>
<li><href="http://news.163.com/07/0701/07/3IA3C7B700011229.html">女大学生卖淫被查获 哀求警察让其参加毕业考试</a></li>
<li><href="http://sports.163.com/07/0701/01/3I9FKSUG00051CA1.html">雄鹿做出首发承诺挽留阿联 欲为他建中文网站</a></li>
<li><href="http://news.163.com/07/0701/00/3I9A8Q3I0001124J.html">湖南娄底73人涉黑被公诉案犯逼死他人毁尸灭迹</a></li>
<li><href="http://news.163.com/07/0701/12/3IAL2R4C00011229.html">广西北海银滩陪泳女郎 光天化日陪客下海(图)</a></li>
<li><href="http://news.163.com/07/0701/07/3IA4K2UM0001124J.html">台湾举行首届槟榔文化博览会 槟榔西施走秀(图</a></li>
<li><href="http://sports.163.com/07/0701/09/3IAA5ELR00051CA1.html">火箭将签立陶宛大个 全能内线有望辅佐姚明</a></li>
<li><href="http://news.163.com/07/0702/02/3IC58APH00011229.html">湖南女大学生爬山锻炼被割喉奸尸(图)</a></li>
</ol>
<div class="clear"></div>
</div>

注意:这些数据不一定是上面的格式的。
有时候<ol>可能会是<ul>;
有时候在每个<a ....></a>后可能有个<br>或者别的标签;
有时候可能没有上面代码中那个<div class="clear"></div>。

我的目的就是匹配HTML中的
<div ...>
...
<a href=....>..........</a>...
<a href=....>..........</a>...
<a href=....>..........</a>...
<a href=....>..........</a>...
...
...
</div>
的代码段

posted on 2007-07-02 10:54  Bankey  阅读(3504)  评论(21编辑  收藏  举报
常用插件:Html Agility PackjchardetThickBoxFCKeditoreWebEditorAjaxProAspNetPager