1

我有一个这样的 HTML 内容,我想从这个内容中解析并提取一个特定城市的 XML 链接,例如我想获取城市 Acton 的 XML 链接,MA 任何人都可以帮助我

<table class="area_links">
<tr>
    <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/tx-abilene.xml" title="Abilene, TX RSS Feed">Abilene, TX</a></td>
    <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/mi-garden-city.xml" title="Garden City, MI RSS Feed">Garden City, MI</a></td>
    <td class="neighborhood"><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/orlando-lake-cherokee.xml" title="Lake Cherokee, Orlando RSS Feed">Lake Cherokee, Orlando</a></td>
</tr>
<tr>
   <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/ma-abington.xml" title="Abington, MA RSS Feed">Abington, MA</a></td>
   <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/ca-garden-grove.xml" title="Garden Grove, CA RSS Feed">Garden Grove, CA</a></td>
   <td class="neighborhood"><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/orlando-lake-dot.xml" title="Lake Dot, Orlando RSS Feed">Lake Dot, Orlando</a></td>
</tr>
<tr>
   <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/ma-acton.xml" title="Acton, MA RSS Feed">Acton, MA</a></td>
   <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/co-garfield-county.xml" title="Garfield County, CO RSS Feed">Garfield County, CO</a></td>
    <td class="neighborhood"><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/orlando-orlando-executive.xml" title="Orlando Executive, Orlando RSS Feed">Orlando Executive, Orlando</a></td>
</tr>
<tr>
   <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/co-adams-county.xml" title="Adams County, CO RSS Feed">Adams County, CO</a></td>
   <td ><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/garland.xml" title="Garland, TX RSS Feed">Garland, TX</a></td>
   <td class="neighborhood"><a type="application/rss+xml" target="_blank" href="http://test.com/cache/rss/orlando-windhover.xml" title="Windhover, Orlando RSS Feed">Windhover, Orlando</a></td>
 </tr>
</table>
4

0 回答 0