Resolving html entities with NSXMLParser on iPhone

前端 未结 6 1474
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 22:05

I think I read every single web page relating to this problem but I still cannot find a solution to it, so here I am.

I have an HTML web page which is not under my co

6条回答
  •  一生所求
    2020-12-08 22:30

    I think your going to run into another problem with this example as it isn't vaild XML which is what the NSXMLParser is looking for.

    The exact problem in the above is that the tags META, LI, HTML and BODY aren't closed so the parser looks all the way though the rest of the document looking for its closing tag.

    The only way around this that I know of if you don't have access to change the HTML is to mirror it with the closing tags inserted.

提交回复
热议问题