获取HTML源文件 特定的值
下面是根据一个URL页面,查看源文件得到的一段HTML格式
我想获取红色 <a > </a >中的超连接文字(比如:Henry Radio;SMT Corp)
还有a中的sid号(如:13685658;28690574)
这段格式我只截取了一部分,还有很多,我要怎么获取这些内容(超连接文字,sid号)
<a href="http://search.stores.ebay.com/search/search.dll?GetResult&sid=13685658&fp=0&query=ni" >Henry Radio </a > </b > </td > <td align="right" width="20%" nowrap > <b >6 matching items </b > </td > <td width="5" > <img height="1" src="http://pics.ebaystatic.com/aw/pics/s.gif" width="5" > </td > </tr > <tr > <td valign="top" colspan="2" >Henry Radio is the manufacturer of high power amplifiers for ham radio, business radio, scientific, and industrial users. We also offer parts and accessories related to amplifiers, RF test equipment,... </td > <td width="5" > <img height="1" src="http://pics.ebaystatic.com/aw/pics/s.gif" width="5" > </td > </tr > </table > </td > </tr > </table > <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr bgcolor="#656565" > <td > <img src="http://pics.ebaystatic.com/aw/pics/s.gif" width="1" height="1" border="0" > </td > </tr > </table > <table width="100%" border="0" cellpadding="5" cellspacing="0" > <tr bgcolor="#FFFFFF" valign="top" > <td width="100%" > <table width="100%" border="0" cellpadding="1" cellspacing="0" > <tr > <td > <b > <a href="http://search.stores.ebay.com/search/search.dll?GetResult&sid=28690574&fp=0&query=ni" >SMT Corp </a > </b > </td > <td align="right" width="20%" nowrap > <b >6 matching items </b > </td > <td width="5" > <img height="1" src="http://pics.ebaystatic.com/aw/pics/s.gif" width="5" > </td > </tr > <tr > <td valign="top" colspan="2" >A distributor of name brand electronic components, computer peripherals, memory products and all related products </td > <td width="5" > <img height="1" src="http://pics.ebaystatic.com/aw/pics/s.gif" width="5" > </td > </tr > </table > </td > </tr > </table > <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr bgcolor="#656565" > <td > <img src="http://pics.ebaystatic.com/aw/pics/s.gif" width="1" height="1" border="0" > </td > </tr > </table > <table width="100%" border="0" cellpadding="5" cellspacing="0" > <tr bgcolor="#D0D9FC" valign="top" > <td width="100%" > <table width="100%" border="0" cellpadding="1" cellspacing="0" > <tr > <td > <b >
分不够可以再加