解析 iOS 应用程序中的标准化 HTML
我正在开发一个以 html 形式提取内容的 iOS 应用程序。这并不理想,但却是我目前所要做的。无论如何,html 采用以下标准格式:
....Any old html up to this point...
<div class="content odd"> Lorem ipsum... </div>
<div class="content even"> Lorem ipsum... </div>
<div class="content odd"> Lorem ipsum... </div>
<div class="content even"> Lorem ipsum... </div>
....Any old html after this point...
对我来说解析它的最佳方法是什么?
I am working on an iOS application that pulls in content as html. It's not ideal, but is all that I have to work with at the moment. Anyway, the html is in the following standard format:
....Any old html up to this point...
<div class="content odd"> Lorem ipsum... </div>
<div class="content even"> Lorem ipsum... </div>
<div class="content odd"> Lorem ipsum... </div>
<div class="content even"> Lorem ipsum... </div>
....Any old html after this point...
What would be the best way for me to parse this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试https://github.com/topfunky/hpple。它似乎很好地处理了 html 的混乱。
Try https://github.com/topfunky/hpple. It seems to handle the mess that is html pretty well.