如何在 iOS 中使用 hpple 解析具有许多子标签的复杂 html。我找不到关于这个库的任何好的和复杂的教程或任何好的文档。通过简单的解析没有任何问题。html示例是:
<div class="post shortcuts_item focus" id="post_243273">
<div class="published">today in 21:03</div>
<h1 class="title">
<a href="http://example.ru/post/243273/" class="post_title">Some simple title text here</a>
</h1>
<div class="hubs">
<a href="http://example.ru/hub/internet_regulation/" class="hub">Simple text 1</a><span class="profiled_hub" title="Profile 1">*</span>,
<a href="http://example.ru/hub/business-laws/" class="hub">Simple text 2</a><span class="profiled_hub" title="Profile 2">*</span>,
<a href="http://example.ru/hub/vkontakte/" class="hub">Simple text 3</a><span class="profiled_hub" title="Profile 3">*</span>,
<a href="http://example.ru/hub/social_networks/" class="hub">Simple text 4</a><span class="profiled_hub" title="Profile 4">*</span>,
<a href="http://example.ru/hub/facebook/" class="hub">Simple text 5</a><span class="profiled_hub" title="Profile 5">*</span>
</div>
<div class="content html_format">
<img src="//example.org/files/aa9/f6c/8a0/aa9f6c8a049e405c9f72bf10ee3a2e9f.png"><br>
<br>
Simple but very long text with link tag <a href="http://example.ru/post/243273/#blahblah">Simple link...</a>
<div class="buttons">
<a href="http://example.ru/post/243273/#habracut">Read more...</a>
</div>
<div class="clear"></div>
</div>
</div>
问题是如何在一次运行中获取所有A
标签。class="hubs"
我怎么能这样做?