gpt4 book ai didi

ios - 获取html中特定标签之间的数据

转载 作者:行者123 更新时间:2023-11-29 03:38:50 26 4
gpt4 key购买 nike

我想从 html 数据中获取特定标签之间的数据。

<ul>    
<li>
More consistent tension control and approximation with each pass than with traditional sutures.
<ul>
<li>Unique anchor designs provide multiple points of fixation along the device, allowing tension on the device to be maintained during closure.<sup><a class="reference_link" href="#22">[22]</a></sup></li>
<li>Compared to traditional sutures, STRATAFIX™ Devices enable surgeons to easily manage tension and control approximation with each pass.<sup><a class="reference_link" href="#3">[3]</a></sup></li>
</ul>
</li>
<ul>

在这里,我想从 <a class="reference_link" href="#3">[3]</a> 获取数据我想存储该值(例如3)。

提前致谢。

最佳答案

看起来互联网上有关于如何在 iOS 上解析 HTML 的相关资源;例如http://www.raywenderlich.com/14172/how-to-parse-html-on-ios :

[...] there is a handy little library that’s included in the iOS SDK called libxml2.

据我所知,这篇文章似乎有关于如何准确实现您想要的代码示例。

关于ios - 获取html中特定标签之间的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18761986/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com