Parse HTML iPhone

后端 未结 3 553
孤独总比滥情好
孤独总比滥情好 2020-12-10 09:39

I have a .html file on a server, which I need to parse info from. It´s nothing huge it´s just




some text

<
3条回答
  •  情深已故
    2020-12-10 10:20

    Rather than encourage you to figure out how best to parse the HTML, may I suggest just leaving a static JSON file on your web server instead? There are many JSON parser libraries available for iOS that will allow you to get the data you need.

    A side effect from doing this is that you will use less bandwidth in the download, it will be faster to parse, and the resulting code will be less brittle to changes in your data payload.

提交回复
热议问题