【发布时间】:2009-10-05 11:00:55
【问题描述】:
在 html 中,一个 rss 链接看起来有点像这样
<a class="rsslink" href="http:the_url">The feed title</a>
我想从包含 rss 提要列表的 html 页面中获取与此描述匹配的所有链接。有人知道解析的好方法,有一些示例代码吗?
【问题讨论】:
在 html 中,一个 rss 链接看起来有点像这样
<a class="rsslink" href="http:the_url">The feed title</a>
我想从包含 rss 提要列表的 html 页面中获取与此描述匹配的所有链接。有人知道解析的好方法,有一些示例代码吗?
【问题讨论】:
libxml2 库可以使用following extensions 接收 XPath 查询。使用这些扩展,您可以在 HTML 文档上发出 XPath 查询 /a[@class = "rsslink"]/@href,以便检索具有这些属性值的 NSArray。
【讨论】: