解析iOS应用程序中的标准化HTML [英] Parse standardised HTML in iOS application

查看:52
本文介绍了解析iOS应用程序中的标准化HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个iOS应用程序,该应用程序将内容作为html引入.这不是理想的选择,但目前是我要做的所有事情.无论如何,html的格式如下:

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?

推荐答案

尝试 https://github.com/topfunky /hpple .似乎可以很好地处理html的混乱局面.

Try https://github.com/topfunky/hpple. It seems to handle the mess that is html pretty well.

这篇关于解析iOS应用程序中的标准化HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆